← Back to team overview

nagios-charmers team mailing list archive

[Merge] ~xavpaice/hw-health-charm:fix_upgrade_hook into hw-health-charm:master

 

Xav Paice has proposed merging ~xavpaice/hw-health-charm:fix_upgrade_hook into hw-health-charm:master.

Requested reviews:
  Nagios Charm developers (nagios-charmers)

For more details, see:
https://code.launchpad.net/~xavpaice/hw-health-charm/+git/hw-health-charm/+merge/364355
-- 
Your team Nagios Charm developers is requested to review the proposed merge of ~xavpaice/hw-health-charm:fix_upgrade_hook into hw-health-charm:master.
diff --git a/src/reactive/hw_health.py b/src/reactive/hw_health.py
index 29cea0f..d1a0fc6 100644
--- a/src/reactive/hw_health.py
+++ b/src/reactive/hw_health.py
@@ -67,15 +67,6 @@ def install():
 
 
 @when('hw-health.installed')
-def any_hook():
-    if hookenv.hook_name() == 'upgrade-charm':
-        clear_flag('hw-health.installed')
-        clear_flag('hw-health.unsupported')
-        clear_flag('hw-health.nrpe')
-        status.maintenance('Charm upgrade in progress')
-
-
-@when('hw-health.installed')
 @when('nrpe-external-master.available')
 def remove_checks(nrpe):
     if hookenv.hook_name() == 'stop':
@@ -90,6 +81,8 @@ def remove_checks(nrpe):
 @when('config.changed')
 def config_changed():
     # clear_flag('hw-health.configured')
+    clear_flag('hw-health.installed')
+    clear_flag('hw-health.unsupported')
     clear_flag('hw-health.nrpe')
 
 

Follow ups