Merge lp:~thedac/charms/trusty/keystone/status-every-hook into lp:~openstack-charmers-archive/charms/trusty/keystone/next

Proposed by David Ames
Status: Merged
Merged at revision: 186
Proposed branch: lp:~thedac/charms/trusty/keystone/status-every-hook
Merge into: lp:~openstack-charmers-archive/charms/trusty/keystone/next
Diff against target: 93 lines (+3/-17)
1 file modified
hooks/keystone_hooks.py (+3/-17)
To merge this branch: bzr merge lp:~thedac/charms/trusty/keystone/status-every-hook
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+273736@code.launchpad.net

Description of the change

Run set_os_workload_status after every hook

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11491 keystone-next for thedac mp273736
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11491/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10685 keystone-next for thedac mp273736
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10685/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7195 keystone-next for thedac mp273736
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/7195/

187. By David Ames

Run even on unknown hook

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11500 keystone-next for thedac mp273736
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11500/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10692 keystone-next for thedac mp273736
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10692/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7204 keystone-next for thedac mp273736
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/7204/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/keystone_hooks.py'
2--- hooks/keystone_hooks.py 2015-09-30 07:01:00 +0000
3+++ hooks/keystone_hooks.py 2015-10-07 20:46:58 +0000
4@@ -47,7 +47,7 @@
5 git_install_requested,
6 openstack_upgrade_available,
7 sync_db_with_multi_ipv6_addresses,
8- os_workload_status,
9+ set_os_workload_status,
10 )
11
12 from keystone_utils import (
13@@ -117,8 +117,6 @@
14
15
16 @hooks.hook('install.real')
17-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
18- charm_func=check_optional_relations)
19 def install():
20 status_set('maintenance', 'Executing pre-install')
21 execd_preinstall()
22@@ -132,8 +130,6 @@
23
24
25 @hooks.hook('config-changed')
26-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
27- charm_func=check_optional_relations)
28 @restart_on_change(restart_map())
29 @synchronize_ca_if_changed(fatal=True)
30 def config_changed():
31@@ -210,8 +206,6 @@
32
33
34 @hooks.hook('shared-db-relation-joined')
35-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
36- charm_func=check_optional_relations)
37 def db_joined():
38 if is_relation_made('pgsql-db'):
39 # error, postgresql is used
40@@ -230,8 +224,6 @@
41
42
43 @hooks.hook('pgsql-db-relation-joined')
44-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
45- charm_func=check_optional_relations)
46 def pgsql_db_joined():
47 if is_relation_made('shared-db'):
48 # raise error
49@@ -270,8 +262,6 @@
50
51
52 @hooks.hook('shared-db-relation-changed')
53-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
54- charm_func=check_optional_relations)
55 @restart_on_change(restart_map())
56 @synchronize_ca_if_changed()
57 def db_changed():
58@@ -295,8 +285,6 @@
59
60
61 @hooks.hook('pgsql-db-relation-changed')
62-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
63- charm_func=check_optional_relations)
64 @restart_on_change(restart_map())
65 @synchronize_ca_if_changed()
66 def pgsql_db_changed():
67@@ -496,8 +484,6 @@
68
69
70 @hooks.hook('ha-relation-joined')
71-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
72- charm_func=check_optional_relations)
73 def ha_joined(relation_id=None):
74 cluster_config = get_hacluster_config()
75 resources = {
76@@ -559,8 +545,6 @@
77
78
79 @hooks.hook('ha-relation-changed')
80-@os_workload_status(CONFIGS, REQUIRED_INTERFACES,
81- charm_func=check_optional_relations)
82 @restart_on_change(restart_map())
83 @synchronize_ca_if_changed()
84 def ha_changed():
85@@ -645,6 +629,8 @@
86 hooks.execute(sys.argv)
87 except UnregisteredHookError as e:
88 log('Unknown hook {} - skipping.'.format(e))
89+ set_os_workload_status(CONFIGS, REQUIRED_INTERFACES,
90+ charm_func=check_optional_relations)
91
92
93 if __name__ == '__main__':

Subscribers

People subscribed via source and target branches