launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24564
[Merge] ~cjwatson/lp-signing:handle-build-label-change into lp-signing:master
Colin Watson has proposed merging ~cjwatson/lp-signing:handle-build-label-change into lp-signing:master.
Commit message:
Install new payload when build label changes
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/lp-signing/+git/lp-signing/+merge/381751
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-signing:handle-build-label-change into lp-signing:master.
diff --git a/charm/lp-signing/reactive/lp-signing.py b/charm/lp-signing/reactive/lp-signing.py
index 5c1114c..3a881ee 100644
--- a/charm/lp-signing/reactive/lp-signing.py
+++ b/charm/lp-signing/reactive/lp-signing.py
@@ -14,6 +14,7 @@ from charmhelpers.core import (
templating,
)
from charms.reactive import (
+ remove_state,
set_state,
when,
)
@@ -72,3 +73,10 @@ def check_is_running():
hookenv.status_set('active', 'Ready')
else:
hookenv.status_set('blocked', 'Service not running, check logs')
+
+
+@when('config.changed.build_label')
+def build_label_changed():
+ remove_state('ols.service.installed')
+ remove_state('ols.configured')
+ remove_state('service.configured')