google-code-export / yabi

Automatically exported from code.google.com/p/yabi
0 stars 1 forks source link

SSH backend error #198

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up an SSH backend
2. Try to run job on it

Just a bash script that lives in /home/<blah>

I tried:
${command}

and 
#!/bin/bash
${command}

but this happens

May  7 16:19:54 localhost YABI [yabibe:root]: [-] status= exec
May  7 16:19:54 localhost YABI [yabibe:root]: [-] POST => 
http://127.0.0.1:80/yabiadmin/default/engine/status/task/16
May  7 16:19:54 localhost YABI [yabibe:root]: [-] METHOD: POST
May  7 16:19:54 localhost YABI [yabibe:root]: [-] TRANSPORT <<class 
'twisted.internet.tcp.Client'> to ('127.0.0.1', 80) at 30bd0d0>
May  7 16:19:54 localhost YABI [yabibe:root]: [-] Executing fresh: None
May  7 16:19:54 localhost YABI [yabibe:root]: [-] logpath= 
/yabiadmin/default/engine/error/task/16
May  7 16:19:54 localhost YABI [yabibe:root]: [-] log= Submitting to <snip> 
command: /home/<snip>/test.sh "12345"
May  7 16:19:54 localhost YABI [yabibe:root]: [-] POST => 
http://127.0.0.1:80/yabiadmin/default/engine/error/task/16
May  7 16:19:54 localhost YABI [yabibe:root]: [-] METHOD: POST
May  7 16:19:54 localhost YABI [yabibe:root]: [-] TRANSPORT <<class 
'twisted.internet.tcp.Client'> to ('127.0.0.1', 80) at 30bd2d0>
May  7 16:19:54 localhost YABI [yabibe:root]: [-] EXEC: 
ssh://<snip>/home/<snip>/46dea1b1-5d4d-4e2a-a365-cdadfebb4fc9/output/ command: 
/home/<snip>/test.sh "12345" kwargs: {'submission': 
u'#!/bin/bash\r\n${command}', 'stdout': 'STDOUT.txt', 'yabiusername': 
u'<snip>', 'queue': u'normal', 'jobtype': u'single', 'stderr': 'STDERR.txt', 
'remote_info': u'/yabiadmin/default/engine/remote_info/16'}
May  7 16:19:54 localhost YABI [yabibe:root]: [-] POST => 
http://127.0.0.1:9001/exec/run
May  7 16:19:54 localhost YABI [yabibe:root]: [-] METHOD: POST
May  7 16:19:54 localhost YABI [yabibe:root]: [-] TRANSPORT <<class 
'twisted.internet.tcp.Client'> to ('127.0.0.1', 9001) at 30bde50>
May  7 16:19:54 localhost YABI [yabibe:root]: [-] Traceback (most recent call 
last):
May  7 16:19:54 localhost YABI [yabibe:root]: [-]   File 
"/usr/local/python/ccgapps/yabibe/default/yabibe/virtualpython/lib/python2.6/sit
e-packages/gevent/greenlet.py", line 390, in run
May  7 16:19:54 localhost YABI [yabibe:root]: [-]     result = 
self._run(*self.args, **self.kwargs)
May  7 16:19:54 localhost YABI [yabibe:root]: [-] TypeError: run() got multiple 
values for keyword argument 'stdout'
May  7 16:19:54 localhost YABI [yabibe:root]: [-] <Greenlet at 0x30ae910: 
<bound method SSHConnector.run of <ex.connector.SSHConnector.SSHConnector 
object at 0x2f1f090>>('<snip>', None, '/home/<snip>/test.sh "12345"', 
'/home/<snip>/46dea1b1-5d4d-4e2a-a365-cdadfebb4fc9/, 'ssh', '<snip>', '<snip>', 
'/yabiadmin/default/engine/remote_info/16', <Deferred at 0x30b6a70>, 
'#!/bin/bash\r\n${command}', queue='normal', stderr='STDERR.txt', 
jobtype='single', stdout='STDOUT.txt')> failed with TypeError

Original issue reported on code.google.com by amacgregor on 7 May 2012 at 8:45

GoogleCodeExporter commented 9 years ago
investigating...

Original comment by retrogra...@gmail.com on 7 May 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Should be fixed now in next_release branch. Recommend using a submission script 
like the following for ssh execution backend:

-------------
#!/bin/bash

cd ${working}
${command} 1>${stdout} 2>${stderr}
--------------

results of submission script running are not presently reported to logs. Only 
success/failure exit code is. Thus be aware stdout and stderr must be 
redirected at this stage.

Will add ticket to add the out/err of _this_ script to be reported back to 
yabiadmin syslog.

Original comment by retrogra...@gmail.com on 11 May 2012 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by retrogra...@gmail.com on 11 May 2012 at 3:44