Hi,
First of all, thanks for your time for writing Surpervisord: it's a very
nice piece of code!
Now, I'd like to report a problem with the web control interface. For
example, when a problem happens with a process so that it cannot
restart correctly, the state chanches from an initial ``backoff`` to
``fatal`` in a few seconds.
In the ``backoff`` state, we cannot 'stop' or 'start' the process.
However, in the ``fatal`` state the web control interface lets
you 'start' the process again. The problem is that if I not take
actions for resolving the problem and I press 'start', then, the next
error appears:
"""
Error response
Error code 500.
Message: Internal Server Error.
"""
Which is not very helpful to determine what's happening.
Also, browsing the code I have seen that, in supervisorctl.py, you only
check for a subset of possible xmlrpc errors. Below is a patch for
having in account some more:
"""
---
/usr/lib/python2.5/site-packages/supervisor-3.0a6-py2.5.egg/supervisor/supervisorctl.py.orig
2008-06-27 11:02:55.000000000 +0200
+++
/usr/lib/python2.5/site-packages/supervisor-3.0a6-py2.5.egg/supervisor/supervisorctl.py
2008-06-27 11:12:06.000000000 +0200
@@ -377,13 +377,21 @@
code = result['status']
template = '%s: ERROR (%s)'
if code == xmlrpc.Faults.BAD_NAME:
- return template % (name,'no such process')
+ return template % (name, 'no such process')
+ elif code == xmlrpc.Faults.NO_FILE:
+ return template % (name, 'no such file')
+ elif code == xmlrpc.Faults.NOT_EXECUTABLE:
+ return template % (name, 'file is not executable')
+ elif code == xmlrpc.Faults.FAILED:
+ return template % (name, 'action failed')
elif code == xmlrpc.Faults.ALREADY_STARTED:
- return template % (name,'already started')
+ return template % (name, 'already started')
elif code == xmlrpc.Faults.SPAWN_ERROR:
return template % (name, 'spawn error')
elif code == xmlrpc.Faults.ABNORMAL_TERMINATION:
return template % (name, 'abnormal termination')
+ elif code == xmlrpc.Faults.NOT_RUNNING:
+ return template % (name, 'not running')
elif code == xmlrpc.Faults.SUCCESS:
return '%s: started' % name
# assertion
"""
Thanks,
--
Francesc Alted
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users