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

Proposed by James Page
Status: Merged
Merged at revision: 49
Proposed branch: lp:~james-page/charms/trusty/openstack-dashboard/bug.1391784
Merge into: lp:~openstack-charmers-archive/charms/trusty/openstack-dashboard/next
Diff against target: 89 lines (+48/-2)
3 files modified
config.yaml (+12/-0)
hooks/horizon_hooks.py (+6/-2)
unit_tests/test_horizon_hooks.py (+30/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/openstack-dashboard/bug.1391784
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Liam Young (community) Approve
Review via email: mp+241526@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 #1006 openstack-dashboard-next for james-page mp241526
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option profile has no default value
  I: config.yaml: option ssl_key has no default value
  I: config.yaml: option vip has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option secret has no default value

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

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

UOSCI bot says:
charm_amulet_test #386 openstack-dashboard-next for james-page mp241526
    AMULET FAIL: amulet-test missing

AMULET Results (max last 5 lines):
INFO:root:Workspace dir: /var/lib/jenkins/workspace/charm_amulet_test
INFO:root:Reading file: Makefile
INFO:root:Searching for: ['@juju test']
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

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

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

UOSCI bot says:
charm_unit_test #841 openstack-dashboard-next for james-page mp241526
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/horizon_hooks 87 8 91% 73-74, 122-124, 149-150, 173
  hooks/horizon_utils 73 8 89% 135, 190-202
  TOTAL 222 17 92%
  Ran 40 tests in 1.910s
  OK

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

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

UOSCI bot says:
charm_lint_check #1009 openstack-dashboard-next for james-page mp241526
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option profile has no default value
  I: config.yaml: option ssl_key has no default value
  I: config.yaml: option vip has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option secret has no default value

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

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

UOSCI bot says:
charm_amulet_test #472 openstack-dashboard-next for james-page mp241526
    AMULET FAIL: amulet-test missing

AMULET Results (max last 5 lines):
INFO:root:Workspace dir: /var/lib/jenkins/workspace/charm_amulet_test
INFO:root:Reading file: Makefile
INFO:root:Searching for: ['@juju test']
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

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

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

UOSCI bot says:
charm_unit_test #964 openstack-dashboard-next for james-page mp241526
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/horizon_hooks 87 8 91% 73-74, 122-124, 149-150, 173
  hooks/horizon_utils 73 8 89% 135, 190-202
  TOTAL 222 17 92%
  Ran 40 tests in 1.653s
  OK

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

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

UOSCI bot says:
charm_lint_check #1130 openstack-dashboard-next for james-page mp241526
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option profile has no default value
  I: config.yaml: option ssl_key has no default value
  I: config.yaml: option vip has no default value
  I: config.yaml: option ssl_cert has no default value
  I: config.yaml: option secret has no default value

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

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 #731 openstack-dashboard-next for james-page mp241526
    LINT OK: passed

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

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

charm_unit_test #760 openstack-dashboard-next for james-page mp241526
    UNIT OK: passed

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

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

charm_amulet_test #916 openstack-dashboard-next for james-page mp241526
    AMULET FAIL: amulet-test missing

AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

Full amulet test output: http://paste.ubuntu.com/9730901/
Build: http://10.245.162.77:8080/job/charm_amulet_test/916/

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

FYI, P, T & U deploy tests are happy.

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:46:35 +0000
4@@ -36,6 +36,18 @@
5 type: string
6 default:
7 description: "Virtual IP to use to front openstack dashboard ha configuration"
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/horizon_hooks.py'
25--- hooks/horizon_hooks.py 2015-01-12 11:48:23 +0000
26+++ hooks/horizon_hooks.py 2015-01-13 14:46:35 +0000
27@@ -162,7 +162,11 @@
28 res_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_horizon_{}_vip'.format(iface)
39 resources[vip_key] = res_vip
40@@ -171,7 +175,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_horizon_hooks.py'
51--- unit_tests/test_horizon_hooks.py 2015-01-09 15:42:47 +0000
52+++ unit_tests/test_horizon_hooks.py 2015-01-13 14:46:35 +0000
53@@ -125,6 +125,36 @@
54 }
55 self.relation_set.assert_called_with(**ex_args)
56
57+ def test_ha_joined_no_bound_ip(self):
58+ conf = {
59+ 'ha-bindiface': 'eth100',
60+ 'ha-mcastport': '37373',
61+ 'vip': '192.168.25.163',
62+ }
63+ self.test_config.set('vip_iface', 'eth120')
64+ self.test_config.set('vip_cidr', '21')
65+ self.get_iface_for_address.return_value = None
66+ self.get_netmask_for_address.return_value = None
67+ self.get_hacluster_config.return_value = conf
68+ self._call_hook('ha-relation-joined')
69+ ex_args = {
70+ 'corosync_mcastport': '37373',
71+ 'init_services': {
72+ 'res_horizon_haproxy': 'haproxy'},
73+ 'resource_params': {
74+ 'res_horizon_eth120_vip':
75+ 'params ip="192.168.25.163" cidr_netmask="21"'
76+ ' nic="eth120"',
77+ 'res_horizon_haproxy': 'op monitor interval="5s"'},
78+ 'corosync_bindiface': 'eth100',
79+ 'clones': {
80+ 'cl_horizon_haproxy': 'res_horizon_haproxy'},
81+ 'resources': {
82+ 'res_horizon_eth120_vip': 'ocf:heartbeat:IPaddr2',
83+ 'res_horizon_haproxy': 'lsb:haproxy'}
84+ }
85+ self.relation_set.assert_called_with(**ex_args)
86+
87 def test_ha_joined_incomplete_config(self):
88 self.get_hacluster_config.side_effect = HAIncompleteConfig(1, 'bang')
89 self.assertRaises(HAIncompleteConfig, self._call_hook,

Subscribers

People subscribed via source and target branches