salt-run vs salt-call publish.runner issue. (1024 chars limits)
Strange issue I noticed with runner functions call via salt-run(on master) vs salt-call publish.runner(via minion). publish.runner seems to stop working if runner function prints more than 1024 chars to stdout.
myrunner.py
def printstr(num=10):
''' Print number of characters to stdout and also return dict '''
str='A'*int(num)
ret_dict={}
ret_dict['str']=str
print str
return ret_dict
On master. Only displays content printed by print statement and works well
salt-run myrunner.printstr 1024 ==> works (for num <=1024)
salt-run myrunner-printstr 1025 ==> works (for num>1024 as well)
On minion: Only prints a dictionary returned by the runner function and breaks as below
salt-call publish.runner myrunner.printstr 1024 ==> works (for num <=1024)
salt-call publish.runner myrunner.printstr 1025 ==> doesn't works (for num >1024)
This is a strange issue as the same call may or may not work via publish.runner. Even if it doesn't print out stdout, but somehow it cares about more than 1024 chars and returns nothing.
This is strange, we will look into it
Ok, the thing that we need to do here is actually to change out the runner system so that it stops printing directly and runs from event being fired
will be fixed by #7926
Thanks much. This will be helpful, as few others bumped into this at my workplace. For now we are using a workaround of not printing to stdout when using publish.runner(). But permanent fix will be very good.
@mlister2006 Just came across this very old issue. Did the fix by @thatch45 in #7926 solve this for you? If so, we can probably go ahead and close this.
Looks like this is fixed for the version 2014.1.2 I am using for the test. Feel free to close this. Thanks.
Thanks for getting back to us so promptly. I'll go ahead and close this.
@cachedout Hey, #7926 isn't a pull request, just an open issue to have this fixed. So I'm not sure anything was actually done to resolve this issue.