Merge lp:~gnuoy/charms/trusty/glance/bug1403132 into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by Liam Young
Status: Merged
Merged at revision: 95
Proposed branch: lp:~gnuoy/charms/trusty/glance/bug1403132
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 102 lines (+15/-6)
3 files modified
config.yaml (+1/-1)
hooks/glance_relations.py (+7/-3)
unit_tests/test_glance_relations.py (+7/-2)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/glance/bug1403132
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+247154@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #943 glance-next for gnuoy mp247154
    LINT OK: passed

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

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

charm_unit_test #972 glance-next for gnuoy mp247154
    UNIT OK: passed

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

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

charm_amulet_test #1165 glance-next for gnuoy mp247154
    AMULET OK: passed

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

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI, all deploy tests are happy. [P-I, T-I, T-J, U-J] x [Stable & Next] charms.

96. By Liam Young

Propogate corosync config option set in the charm to the hacluster subordinate

97. By Liam Young

Fix unit tests

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

charm_lint_check #1036 glance-next for gnuoy mp247154
    LINT OK: passed

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

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

charm_unit_test #1028 glance-next for gnuoy mp247154
    UNIT OK: passed

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

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

charm_amulet_test #1216 glance-next for gnuoy mp247154
    AMULET OK: passed

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

Revision history for this message
Liam Young (gnuoy) wrote :

Tested upgrade with mojo spec dev/multicast_port_change lp:~ost-maintainers/openstack-mojo-specs/mojo-openstack-specs

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-01-13 14:38:31 +0000
3+++ config.yaml 2015-01-22 16:56:13 +0000
4@@ -92,7 +92,7 @@
5 with the other members of the HA Cluster.
6 ha-mcastport:
7 type: int
8- default: 5402
9+ default: 5444
10 description: |
11 Default multicast port number that will be used to communicate between
12 HA Cluster nodes.
13
14=== modified file 'hooks/glance_relations.py'
15--- hooks/glance_relations.py 2015-01-13 14:38:31 +0000
16+++ hooks/glance_relations.py 2015-01-22 16:56:13 +0000
17@@ -322,6 +322,8 @@
18 [keystone_joined(rid) for rid in relation_ids('identity-service')]
19 [image_service_joined(rid) for rid in relation_ids('image-service')]
20 [cluster_joined(rid) for rid in relation_ids('cluster')]
21+ for r_id in relation_ids('ha'):
22+ ha_relation_joined(relation_id=r_id)
23
24
25 @hooks.hook('cluster-relation-joined')
26@@ -359,7 +361,7 @@
27
28
29 @hooks.hook('ha-relation-joined')
30-def ha_relation_joined():
31+def ha_relation_joined(relation_id=None):
32 cluster_config = get_hacluster_config()
33
34 resources = {
35@@ -397,7 +399,8 @@
36 vip_group.append(vip_key)
37
38 if len(vip_group) >= 1:
39- relation_set(groups={'grp_glance_vips': ' '.join(vip_group)})
40+ relation_set(relation_id=relation_id,
41+ groups={'grp_glance_vips': ' '.join(vip_group)})
42
43 init_services = {
44 'res_glance_haproxy': 'haproxy',
45@@ -407,7 +410,8 @@
46 'cl_glance_haproxy': 'res_glance_haproxy',
47 }
48
49- relation_set(init_services=init_services,
50+ relation_set(relation_id=relation_id,
51+ init_services=init_services,
52 corosync_bindiface=cluster_config['ha-bindiface'],
53 corosync_mcastport=cluster_config['ha-mcastport'],
54 resources=resources,
55
56=== modified file 'unit_tests/test_glance_relations.py'
57--- unit_tests/test_glance_relations.py 2015-01-13 14:38:31 +0000
58+++ unit_tests/test_glance_relations.py 2015-01-22 16:56:13 +0000
59@@ -507,6 +507,7 @@
60 self.get_netmask_for_address.return_value = '255.255.0.0'
61 relations.ha_relation_joined()
62 args = {
63+ 'relation_id': None,
64 'corosync_bindiface': 'em0',
65 'corosync_mcastport': '8080',
66 'init_services': {'res_glance_haproxy': 'haproxy'},
67@@ -519,7 +520,8 @@
68 'clones': {'cl_glance_haproxy': 'res_glance_haproxy'}
69 }
70 self.relation_set.assert_has_calls([
71- call(groups={'grp_glance_vips': 'res_glance_eth1_vip'}),
72+ call(relation_id=None,
73+ groups={'grp_glance_vips': 'res_glance_eth1_vip'}),
74 call(**args),
75 ])
76
77@@ -535,6 +537,7 @@
78 self.get_netmask_for_address.return_value = None
79 relations.ha_relation_joined()
80 args = {
81+ 'relation_id': None,
82 'corosync_bindiface': 'em0',
83 'corosync_mcastport': '8080',
84 'init_services': {'res_glance_haproxy': 'haproxy'},
85@@ -547,7 +550,8 @@
86 'clones': {'cl_glance_haproxy': 'res_glance_haproxy'}
87 }
88 self.relation_set.assert_has_calls([
89- call(groups={'grp_glance_vips': 'res_glance_eth120_vip'}),
90+ call(relation_id=None,
91+ groups={'grp_glance_vips': 'res_glance_eth120_vip'}),
92 call(**args),
93 ])
94
95@@ -562,6 +566,7 @@
96 self.get_netmask_for_address.return_value = '64'
97 relations.ha_relation_joined()
98 args = {
99+ 'relation_id': None,
100 'corosync_bindiface': 'em0',
101 'corosync_mcastport': '8080',
102 'init_services': {'res_glance_haproxy': 'haproxy'},

Subscribers

People subscribed via source and target branches