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

Proposed by James Page
Status: Merged
Merged at revision: 136
Proposed branch: lp:~james-page/charms/trusty/nova-cloud-controller/bug.1391784
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 94 lines (+49/-2)
3 files modified
config.yaml (+12/-0)
hooks/nova_cc_hooks.py (+6/-2)
unit_tests/test_nova_cc_hooks.py (+31/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/nova-cloud-controller/bug.1391784
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Liam Young (community) Approve
Review via email: mp+241525@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 #1005 nova-cloud-controller-next for james-page mp241525
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option haproxy-client-timeout has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option nvp-l3-uuid has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option nvp-controllers has no default value

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

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

UOSCI bot says:
charm_unit_test #840 nova-cloud-controller-next for james-page mp241525
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/nova_cc_hooks 443 126 72% 132-135, 148-149, 173, 184-185, 189, 221, 226-231, 242, 322-325, 333-336, 342-345, 355-371, 380-382, 392-406, 410-419, 505, 515, 519-520, 573, 579-589, 594-605, 615-625, 641-642, 683-698, 706-710, 735-744, 768, 773-781, 807, 857-860
  hooks/nova_cc_utils 447 112 75% 296-301, 312-315, 325-326, 382, 384, 430-432, 436, 450-458, 465-470, 474-488, 548, 597-599, 604-607, 612, 616, 640-641, 655-657, 678-679, 685-708, 712-718, 722-728, 734, 740, 747, 758-762, 847, 907-913, 917-919, 923-926, 930-942
  TOTAL 1041 347 67%
  Ran 97 tests in 9.644s
  OK

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

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

UOSCI bot says:
charm_amulet_test #385 nova-cloud-controller-next for james-page mp241525
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv04"
  WARNING cannot delete security group "juju-osci-sv04-0". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv04". Used by another environment?
  WARNING cannot delete security group "juju-osci-sv04-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

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

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

UOSCI bot says:
charm_lint_check #1079 nova-cloud-controller-next for james-page mp241525
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option haproxy-client-timeout has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option nvp-l3-uuid has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option nvp-controllers has no default value

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

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

UOSCI bot says:
charm_unit_test #913 nova-cloud-controller-next for james-page mp241525
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/nova_cc_hooks 443 126 72% 132-135, 148-149, 173, 184-185, 189, 221, 226-231, 242, 322-325, 333-336, 342-345, 355-371, 380-382, 392-406, 410-419, 505, 515, 519-520, 573, 579-589, 594-605, 615-625, 641-642, 683-698, 706-710, 735-744, 768, 773-781, 807, 857-860
  hooks/nova_cc_utils 447 112 75% 296-301, 312-315, 325-326, 382, 384, 430-432, 436, 450-458, 465-470, 474-488, 548, 597-599, 604-607, 612, 616, 640-641, 655-657, 678-679, 685-708, 712-718, 722-728, 734, 740, 747, 758-762, 847, 907-913, 917-919, 923-926, 930-942
  TOTAL 1041 347 67%
  Ran 97 tests in 9.171s
  OK

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

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

UOSCI bot says:
charm_amulet_test #421 nova-cloud-controller-next for james-page mp241525
    AMULET OK: passed

AMULET Results (max last 5 lines):
  juju-test.conductor.15-basic-trusty-icehouse RESULT :
  juju-test.conductor DEBUG : Tearing down osci-sv02 juju environment
  juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv02"
  WARNING cannot delete security group "juju-osci-sv02-0". Used by another environment?
  juju-test INFO : Results: 3 passed, 0 failed, 0 errored

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

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

UOSCI bot says:
charm_lint_check #1158 nova-cloud-controller-next for james-page mp241525
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option haproxy-client-timeout has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option nvp-l3-uuid has no default value
  I: config.yaml: option os-internal-network has no default value
  I: config.yaml: option nvp-controllers has no default value

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

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

UOSCI bot says:
charm_unit_test #992 nova-cloud-controller-next for james-page mp241525
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/nova_cc_hooks 443 126 72% 132-135, 148-149, 173, 184-185, 189, 221, 226-231, 242, 322-325, 333-336, 342-345, 355-371, 380-382, 392-406, 410-419, 505, 515, 519-520, 573, 579-589, 594-605, 615-625, 641-642, 683-698, 706-710, 735-744, 768, 773-781, 807, 857-860
  hooks/nova_cc_utils 447 112 75% 296-301, 312-315, 325-326, 382, 384, 430-432, 436, 450-458, 465-470, 474-488, 548, 597-599, 604-607, 612, 616, 640-641, 655-657, 678-679, 685-708, 712-718, 722-728, 734, 740, 747, 758-762, 847, 907-913, 917-919, 923-926, 930-942
  TOTAL 1041 347 67%
  Ran 97 tests in 9.603s
  OK

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

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

UOSCI bot says:
charm_amulet_test #500 nova-cloud-controller-next for james-page mp241525
    AMULET FAIL: amulet-test failed

AMULET Results (max last 5 lines):
  ERROR waited for 10m0s without being able to connect: ssh: connect to host 10.212.2.249 port 22: No route to host
  juju-test.conductor WARNING : Could not bootstrap osci-sv02, got Bootstrap returned with an exit > 0. Skipping
  juju-test INFO : Results: 1 passed, 1 failed, 1 errored
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

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 #730 nova-cloud-controller-next for james-page mp241525
    LINT OK: passed

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

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

charm_unit_test #759 nova-cloud-controller-next for james-page mp241525
    UNIT OK: passed

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

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

charm_amulet_test #915 nova-cloud-controller-next for james-page mp241525
    AMULET OK: passed

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

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:36 +0000
3+++ config.yaml 2015-01-13 14:45:13 +0000
4@@ -103,6 +103,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/nova_cc_hooks.py'
25--- hooks/nova_cc_hooks.py 2015-01-12 12:04:00 +0000
26+++ hooks/nova_cc_hooks.py 2015-01-13 14:45:13 +0000
27@@ -648,7 +648,11 @@
28 res_nova_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_nova_{}_vip'.format(iface)
39 resources[vip_key] = res_nova_vip
40@@ -657,7 +661,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_nova_cc_hooks.py'
51--- unit_tests/test_nova_cc_hooks.py 2015-01-12 14:23:34 +0000
52+++ unit_tests/test_nova_cc_hooks.py 2015-01-13 14:45:13 +0000
53@@ -64,6 +64,9 @@
54 'migrate_nova_database',
55 'migrate_neutron_database',
56 'uuid',
57+ 'get_hacluster_config',
58+ 'get_iface_for_address',
59+ 'get_netmask_for_address',
60 'update_nrpe_config',
61 ]
62
63@@ -607,3 +610,31 @@
64 'Not running neutron database migration as migrations are handled'
65 'by the neutron-server process.'
66 )
67+
68+ def test_ha_relation_joined_no_bound_ip(self):
69+ self.get_hacluster_config.return_value = {
70+ 'ha-bindiface': 'em0',
71+ 'ha-mcastport': '8080',
72+ 'vip': '10.10.10.10',
73+ }
74+ self.test_config.set('vip_iface', 'eth120')
75+ self.test_config.set('vip_cidr', '21')
76+ self.get_iface_for_address.return_value = None
77+ self.get_netmask_for_address.return_value = None
78+ hooks.ha_joined()
79+ args = {
80+ 'corosync_bindiface': 'em0',
81+ 'corosync_mcastport': '8080',
82+ 'init_services': {'res_nova_haproxy': 'haproxy'},
83+ 'resources': {'res_nova_eth120_vip': 'ocf:heartbeat:IPaddr2',
84+ 'res_nova_haproxy': 'lsb:haproxy'},
85+ 'resource_params': {
86+ 'res_nova_eth120_vip': 'params ip="10.10.10.10"'
87+ ' cidr_netmask="21" nic="eth120"',
88+ 'res_nova_haproxy': 'op monitor interval="5s"'},
89+ 'clones': {'cl_nova_haproxy': 'res_nova_haproxy'}
90+ }
91+ self.relation_set.assert_has_calls([
92+ call(groups={'grp_nova_vips': 'res_nova_eth120_vip'}),
93+ call(**args),
94+ ])

Subscribers

People subscribed via source and target branches