Merge lp:~james-page/charms/trusty/cinder/bug.1391784 into lp:~openstack-charmers-archive/charms/trusty/cinder/next

Proposed by James Page
Status: Merged
Merged at revision: 69
Proposed branch: lp:~james-page/charms/trusty/cinder/bug.1391784
Merge into: lp:~openstack-charmers-archive/charms/trusty/cinder/next
Diff against target: 98 lines (+57/-2)
3 files modified
config.yaml (+12/-0)
hooks/cinder_hooks.py (+6/-2)
unit_tests/test_cluster_hooks.py (+39/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/cinder/bug.1391784
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Liam Young (community) Approve
Review via email: mp+241514@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
charm_lint_check #1001 cinder-next for james-page mp241514
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option config-flags has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option os-public-network has no default value

Full lint test output: http://paste.ubuntu.com/8960542/
Build: http://10.98.191.181:8080/job/charm_lint_check/1001/

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

UOSCI bot says:
charm_unit_test #836 cinder-next for james-page mp241514
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/cinder_hooks 195 6 97% 99-100, 115, 122, 288-289
  hooks/cinder_utils 173 14 92% 191, 410-415, 452-464
  TOTAL 420 26 94%
  Ran 87 tests in 6.270s
  OK

Full unit test output: http://paste.ubuntu.com/8960545/
Build: http://10.98.191.181:8080/job/charm_unit_test/836/

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

UOSCI bot says:
charm_amulet_test #381 cinder-next for james-page mp241514
    AMULET FAIL: amulet-test failed

AMULET Results (max last 5 lines):
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 2 passed, 1 failed, 0 errored
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/8960864/
Build: http://10.98.191.181:8080/job/charm_amulet_test/381/

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

UOSCI bot says:
charm_lint_check #1074 cinder-next for james-page mp241514
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option config-flags has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option os-public-network has no default value

Full lint test output: http://paste.ubuntu.com/9043275/
Build: http://10.98.191.181:8080/job/charm_lint_check/1074/

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

UOSCI bot says:
charm_unit_test #908 cinder-next for james-page mp241514
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/cinder_hooks 195 6 97% 99-100, 115, 122, 288-289
  hooks/cinder_utils 173 14 92% 191, 410-415, 452-464
  TOTAL 420 26 94%
  Ran 87 tests in 5.528s
  OK

Full unit test output: http://paste.ubuntu.com/9043278/
Build: http://10.98.191.181:8080/job/charm_unit_test/908/

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

UOSCI bot says:
charm_amulet_test #416 cinder-next for james-page mp241514
    AMULET FAIL: amulet-test failed

AMULET Results (max last 5 lines):
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv07"
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 1 passed, 2 failed, 0 errored
  ERROR subprocess encountered error code 2
  make: *** [test] Error 2

Full amulet test output: http://paste.ubuntu.com/9043596/
Build: http://10.98.191.181:8080/job/charm_amulet_test/416/

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

UOSCI bot says:
charm_lint_check #1154 cinder-next for james-page mp241514
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option config-flags has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option os-public-network has no default value

Full lint test output: http://paste.ubuntu.com/9126481/
Build: http://10.98.191.181:8080/job/charm_lint_check/1154/

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

UOSCI bot says:
charm_unit_test #988 cinder-next for james-page mp241514
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/cinder_hooks 195 6 97% 99-100, 115, 122, 288-289
  hooks/cinder_utils 173 14 92% 191, 410-415, 452-464
  TOTAL 420 26 94%
  Ran 87 tests in 6.270s
  OK

Full unit test output: http://paste.ubuntu.com/9126492/
Build: http://10.98.191.181:8080/job/charm_unit_test/988/

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

UOSCI bot says:
charm_amulet_test #496 cinder-next for james-page mp241514
    AMULET FAIL: amulet-test failed

AMULET Results (max last 5 lines):
  subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-L', '-c', '/tmp/amulet-juju-deployer-H1LWry.json', '-e', 'osci-sv07', '-t', '1000', 'osci-sv07']' returned non-zero exit status 1
  WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
  juju-test INFO : Results: 0 passed, 2 failed, 1 errored
  ERROR subprocess encountered error code 2
  make: *** [test] Error 2

Full amulet test output: http://paste.ubuntu.com/9127186/
Build: http://10.98.191.181:8080/job/charm_amulet_test/496/

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

Approve

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

charm_lint_check #726 cinder-next for james-page mp241514
    LINT OK: passed

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

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

charm_unit_test #755 cinder-next for james-page mp241514
    UNIT OK: passed

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

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

charm_amulet_test #911 cinder-next for james-page mp241514
    AMULET OK: passed

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

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

FYI P, T & U deploy tests are good!

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 2014-10-30 03:30:35 +0000
3+++ config.yaml 2015-01-13 14:36:57 +0000
4@@ -118,6 +118,18 @@
5 .
6 If multiple networks are being used, a VIP should be provided for each
7 network, separated by spaces.
8+ vip_iface:
9+ type: string
10+ default: eth0
11+ description: |
12+ Default network interface to use for HA vip when it cannot be automatically
13+ determined.
14+ vip_cidr:
15+ type: int
16+ default: 24
17+ description: |
18+ Default CIDR netmask to use for HA vip when it cannot be automatically
19+ determined.
20 ha-bindiface:
21 type: string
22 default: eth0
23
24=== modified file 'hooks/cinder_hooks.py'
25--- hooks/cinder_hooks.py 2015-01-12 12:03:59 +0000
26+++ hooks/cinder_hooks.py 2015-01-13 14:36:57 +0000
27@@ -343,7 +343,11 @@
28 res_cinder_vip = 'ocf:heartbeat:IPaddr2'
29 vip_params = 'ip'
30
31- iface = get_iface_for_address(vip)
32+ iface = (get_iface_for_address(vip) or
33+ config('vip_iface'))
34+ netmask = (get_netmask_for_address(vip) or
35+ config('vip_cidr'))
36+
37 if iface is not None:
38 vip_key = 'res_cinder_{}_vip'.format(iface)
39 resources[vip_key] = res_cinder_vip
40@@ -352,7 +356,7 @@
41 ' nic="{iface}"'.format(ip=vip_params,
42 vip=vip,
43 iface=iface,
44- netmask=get_netmask_for_address(vip))
45+ netmask=netmask)
46 )
47 vip_group.append(vip_key)
48
49
50=== modified file 'unit_tests/test_cluster_hooks.py'
51--- unit_tests/test_cluster_hooks.py 2014-11-07 14:47:00 +0000
52+++ unit_tests/test_cluster_hooks.py 2015-01-13 14:36:57 +0000
53@@ -181,6 +181,45 @@
54 }
55 self.relation_set.assert_called_with(**ex_args)
56
57+ def test_ha_joined_no_bound_ip(self):
58+ '''
59+ Ensure fallback configuration options are used if network
60+ interface cannot be auto-detected
61+ '''
62+ conf = {
63+ 'ha-bindiface': 'eth100',
64+ 'ha-mcastport': '37373',
65+ 'vip': '192.168.25.163',
66+ }
67+
68+ self.test_config.set('prefer-ipv6', 'False')
69+ self.test_config.set('vip_iface', 'eth120')
70+ self.test_config.set('vip_cidr', '21')
71+ self.get_hacluster_config.return_value = conf
72+ self.get_iface_for_address.return_value = None
73+ self.get_netmask_for_address.return_value = None
74+ hooks.hooks.execute(['hooks/ha-relation-joined'])
75+ ex_args = {
76+ 'corosync_mcastport': '37373',
77+ 'init_services': {'res_cinder_haproxy': 'haproxy'},
78+ 'resource_params': {
79+ 'res_cinder_eth120_vip':
80+ 'params ip="192.168.25.163" cidr_netmask="21"'
81+ ' nic="eth120"',
82+ 'res_cinder_haproxy': 'op monitor interval="5s"'
83+ },
84+ 'corosync_bindiface': 'eth100',
85+ 'clones': {'cl_cinder_haproxy': 'res_cinder_haproxy'},
86+ 'resources': {
87+ 'res_cinder_eth120_vip': 'ocf:heartbeat:IPaddr2',
88+ 'res_cinder_haproxy': 'lsb:haproxy'
89+ }
90+ }
91+ self.relation_set.assert_has_calls([
92+ call(groups={'grp_cinder_vips': 'res_cinder_eth120_vip'}),
93+ call(**ex_args)
94+ ])
95+
96 @patch.object(hooks, 'identity_joined')
97 def test_ha_changed_clustered(self, joined):
98 self.relation_get.return_value = True

Subscribers

People subscribed via source and target branches