Action return value too long for commandline

Merlijn Sebrechts merlijn.sebrechts at gmail.com
Sun Apr 3 19:00:09 UTC 2016


Hi all


The apache-kafka charm has an action "read-topic" that can return a lot of
data. Sometimes, this data is too long to be passed to `action-set` by
commandline. You get the following error:

Traceback (most recent call last):
  File "actions/read-topic", line 36, in <module>
    hookenv.action_set({'output': output})
  File
"/usr/local/lib/python2.7/dist-packages/charmhelpers/core/hookenv.py", line
615, in action_set
    subprocess.check_call(cmd)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 7] Argument list too long


Is there any way to pass a file to action-set?



Kind regards
Merlijn Sebrechts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160403/e30d2200/attachment.html>


More information about the Juju mailing list