This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit 9cc1314646b319805d3478f55823bb47074d75d7 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Apr 23 13:43:33 2015 +0200 fix: deactivating a module that failed will update the global status of the host --- app/modules/storage_modules/shelve_db.py | 11 +++++++++++ app/mum.py | 1 + 2 files changed, 12 insertions(+) diff --git a/app/modules/storage_modules/shelve_db.py b/app/modules/storage_modules/shelve_db.py index 16aa2ed..e26486e 100644 --- a/app/modules/storage_modules/shelve_db.py +++ b/app/modules/storage_modules/shelve_db.py @@ -637,6 +637,17 @@ class shelve_db: rem_instr['addr'] = args['addr_host'] rem_instr['mod_name'] = mod_name dict_instr['rem'].append(rem_instr) + # and from the monitoring data structure + del self.db['hosts'][addr_host]['monitoring'][mod_name] + state = 'success' + for mod_in_monitoring in self.db['hosts'][addr_host]['monitoring']: + if self.db['hosts'][addr_host]['monitoring'][mod_in_monitoring]['state'] == 'danger': + state = 'danger' + elif self.db['hosts'][addr_host]['monitoring'][mod_in_monitoring]['state'] == 'warning' \ + and not state == 'danger': + state = 'warning' + self.db['hosts'][addr_host]['status']['state'] = state + except Exception: print traceback.format_exc() finally: diff --git a/app/mum.py b/app/mum.py index 5c77fe5..2a711bb 100755 --- a/app/mum.py +++ b/app/mum.py @@ -167,6 +167,7 @@ def receive(ws): ws.send(json.dumps({"RES_GET_HOSTS": ml.get_db().get_hosts()})) elif code == "SET_MOD_ACTIVATION": # asked from hostpage, at the block activation conf ml.update_activated_modules(msg["SET_MOD_ACTIVATION"]) + ws.send(json.dumps({"RES_GET_HOSTS": ml.db.get_hosts()})) elif code == "TEST_CONN": try: ml.test_connection(msg["TEST_CONN"]["addr_host"], -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.