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

Proposed by James Page
Status: Merged
Merged at revision: 102
Proposed branch: lp:~james-page/charms/trusty/keystone/bug.1391784
Merge into: lp:~openstack-charmers-archive/charms/trusty/keystone/next
Diff against target: 84 lines (+43/-2)
3 files modified
config.yaml (+12/-0)
hooks/keystone_hooks.py (+6/-2)
unit_tests/test_keystone_hooks.py (+25/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/keystone/bug.1391784
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Liam Young (community) Approve
Review via email: mp+241517@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 #1003 keystone-next for james-page mp241517
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option os-public-network has no default value
  I: config.yaml: option os-admin-network 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

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

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

UOSCI bot says:
charm_unit_test #838 keystone-next for james-page mp241517
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/keystone_ssl 158 132 16% 106-128, 132-146, 150-158, 162-172, 176-177, 182-193, 197-206, 210-221, 225-237, 243-256, 259-266, 269-279, 282-296, 299-302
  hooks/keystone_utils 387 202 48% 204, 218, 242-247, 290-299, 306-321, 328-336, 341-351, 358-384, 389-398, 403-417, 422-444, 449-466, 480-503, 512-517, 522, 529-539, 544-552, 557-562, 566-573, 581-586, 597-612, 616-624, 649-650, 729, 732, 781-794, 818-822, 826-838
  TOTAL 809 404 50%
  Ran 38 tests in 3.341s
  OK

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

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

UOSCI bot says:
charm_amulet_test #383 keystone-next for james-page mp241517
    AMULET OK: passed

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

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

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

UOSCI bot says:
charm_lint_check #1077 keystone-next for james-page mp241517
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option os-public-network has no default value
  I: config.yaml: option os-admin-network 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

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

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

UOSCI bot says:
charm_unit_test #911 keystone-next for james-page mp241517
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/keystone_ssl 158 132 16% 106-128, 132-146, 150-158, 162-172, 176-177, 182-193, 197-206, 210-221, 225-237, 243-256, 259-266, 269-279, 282-296, 299-302
  hooks/keystone_utils 387 202 48% 204, 218, 242-247, 290-299, 306-321, 328-336, 341-351, 358-384, 389-398, 403-417, 422-444, 449-466, 480-503, 512-517, 522, 529-539, 544-552, 557-562, 566-573, 581-586, 597-612, 616-624, 649-650, 729, 732, 781-794, 818-822, 826-838
  TOTAL 809 404 50%
  Ran 38 tests in 3.256s
  OK

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

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

UOSCI bot says:
charm_amulet_test #419 keystone-next for james-page mp241517
    AMULET OK: passed

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

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

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

UOSCI bot says:
charm_lint_check #1156 keystone-next for james-page mp241517
    LINT OK: passed

LINT Results (max last 5 lines):
  I: config.yaml: option ssl_ca has no default value
  I: config.yaml: option os-public-network has no default value
  I: config.yaml: option os-admin-network 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

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

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

UOSCI bot says:
charm_unit_test #990 keystone-next for james-page mp241517
    UNIT OK: passed

UNIT Results (max last 5 lines):
  hooks/keystone_ssl 158 132 16% 106-128, 132-146, 150-158, 162-172, 176-177, 182-193, 197-206, 210-221, 225-237, 243-256, 259-266, 269-279, 282-296, 299-302
  hooks/keystone_utils 387 202 48% 204, 218, 242-247, 290-299, 306-321, 328-336, 341-351, 358-384, 389-398, 403-417, 422-444, 449-466, 480-503, 512-517, 522, 529-539, 544-552, 557-562, 566-573, 581-586, 597-612, 616-624, 649-650, 729, 732, 781-794, 818-822, 826-838
  TOTAL 809 404 50%
  Ran 38 tests in 3.106s
  OK

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

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

UOSCI bot says:
charm_amulet_test #498 keystone-next for james-page mp241517
    AMULET OK: passed

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

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

93. By James Page

Tweak tests

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 #728 keystone-next for james-page mp241517
    LINT OK: passed

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

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

charm_unit_test #757 keystone-next for james-page mp241517
    UNIT OK: passed

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

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

charm_amulet_test #913 keystone-next for james-page mp241517
    AMULET OK: passed

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

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 2015-01-09 15:54:17 +0000
3+++ config.yaml 2015-01-13 14:42:12 +0000
4@@ -138,6 +138,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/keystone_hooks.py'
25--- hooks/keystone_hooks.py 2015-01-12 12:04:00 +0000
26+++ hooks/keystone_hooks.py 2015-01-13 14:42:12 +0000
27@@ -294,7 +294,11 @@
28 res_ks_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_ks_{}_vip'.format(iface)
39 resources[vip_key] = res_ks_vip
40@@ -303,7 +307,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_keystone_hooks.py'
51--- unit_tests/test_keystone_hooks.py 2015-01-09 15:58:43 +0000
52+++ unit_tests/test_keystone_hooks.py 2015-01-13 14:42:12 +0000
53@@ -385,6 +385,31 @@
54 }
55 self.relation_set.assert_called_with(**args)
56
57+ def test_ha_joined_no_bound_ip(self):
58+ self.get_hacluster_config.return_value = {
59+ 'vip': '10.10.10.10',
60+ 'ha-bindiface': 'em0',
61+ 'ha-mcastport': '8080'
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+ hooks.ha_joined()
68+ args = {
69+ 'corosync_bindiface': 'em0',
70+ 'corosync_mcastport': '8080',
71+ 'init_services': {'res_ks_haproxy': 'haproxy'},
72+ 'resources': {'res_ks_eth120_vip': 'ocf:heartbeat:IPaddr2',
73+ 'res_ks_haproxy': 'lsb:haproxy'},
74+ 'resource_params': {
75+ 'res_ks_eth120_vip': 'params ip="10.10.10.10"'
76+ ' cidr_netmask="21" nic="eth120"',
77+ 'res_ks_haproxy': 'op monitor interval="5s"'},
78+ 'clones': {'cl_ks_haproxy': 'res_ks_haproxy'}
79+ }
80+ self.relation_set.assert_called_with(**args)
81+
82 def test_ha_joined_with_ipv6(self):
83 self.test_config.set('prefer-ipv6', True)
84 self.get_hacluster_config.return_value = {

Subscribers

People subscribed via source and target branches