salt icon indicating copy to clipboard operation
salt copied to clipboard

salt-run vs salt-call publish.runner issue. (1024 chars limits)

Open mlister2006 opened this issue 13 years ago • 8 comments

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.

mlister2006 avatar Apr 25 '13 02:04 mlister2006

This is strange, we will look into it

thatch45 avatar Apr 26 '13 18:04 thatch45

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

thatch45 avatar Oct 17 '13 19:10 thatch45

will be fixed by #7926

thatch45 avatar Oct 17 '13 19:10 thatch45

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 avatar Oct 18 '13 13:10 mlister2006

@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.

cachedout avatar Apr 22 '14 19:04 cachedout

Looks like this is fixed for the version 2014.1.2 I am using for the test. Feel free to close this. Thanks.

mlister2006 avatar Apr 23 '14 00:04 mlister2006

Thanks for getting back to us so promptly. I'll go ahead and close this.

cachedout avatar Apr 23 '14 03:04 cachedout

@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.

UtahDave avatar Apr 23 '14 16:04 UtahDave