[Erp5-report] r34860 luke - /erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 29 17:04:52 CEST 2010
Author: luke
Date: Thu Apr 29 17:04:50 2010
New Revision: 34860
URL: http://svn.erp5.org?rev=34860&view=rev
Log:
- invoke supervisor start all always
Sometimes there are FATAL processes, but subsequent runs of timmy can repair
its configuration. In such case it is good to try have them running, but
supervisor will not start them again, so it is needed to force it.
Modified:
erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py
Modified: erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py?rev=34860&r1=34859&r2=34860&view=diff
==============================================================================
--- erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py [utf8] (original)
+++ erp5/trunk/utils/erp5.timmy/src/erp5/timmy/timmy.py [utf8] Thu Apr 29 17:04:50 2010
@@ -666,6 +666,25 @@
log_message)
logging.error(log_message)
+ # do start all of supervisor controlled programs
+ # it is noop in case if all is running
+ # it forces to start problematic services (FATAL state)
+ supervisorctl_popen = subprocess.Popen([SUPERVISORCTL, 'start', 'all'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (result_std, result_err) = supervisorctl_popen.communicate()
+ if supervisorctl_popen.returncode != 0:
+ log_message = 'Supervisorctl issue during start all: stdout = %r std'\
+ 'err = %r' % (result_std, result_err)
+ server.call('updatePartitionState', supervisor_id, 'reportError',
+ log_message)
+ logging.error(log_message)
+ elif len(result_std) > 0 or len(result_err) > 0:
+ # emit log only in case if something important was done by supervisor
+ # no need to pollute master server, as this is only local server hack
+ logging.info('Supervisorctl start all with: stdout = %r stderr = %r' % (
+ result_std, result_err))
+
+
# 3 pass - manage instances
# XXX-Luke: To be moved to proper recipe
updated_partition_list = []
More information about the Erp5-report
mailing list