Merge lp:~hopem/charms/trusty/keystone/lp1476325 into lp:~openstack-charmers-archive/charms/trusty/keystone/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 181
Proposed branch: lp:~hopem/charms/trusty/keystone/lp1476325
Merge into: lp:~openstack-charmers-archive/charms/trusty/keystone/next
Diff against target: 60 lines (+31/-1)
2 files modified
hooks/keystone_hooks.py (+7/-1)
unit_tests/test_keystone_hooks.py (+24/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/keystone/lp1476325
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Billy Olsen Pending
Review via email: mp+271219@code.launchpad.net

This proposal supersedes a proposal from 2015-07-20.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #6511 keystone-next for hopem mp265292
    LINT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #6143 keystone-next for hopem mp265292
    UNIT OK: passed

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

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #5233 keystone-next for hopem mp265292
    AMULET OK: passed

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

Revision history for this message
Billy Olsen (billy-olsen) wrote : Posted in a previous version of this proposal

Tested fine and looks good to me. Only request is for a unit test, otherwise I'm +1.

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

charm_lint_check #10117 keystone-next for hopem mp271219
    LINT OK: passed

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

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

charm_unit_test #9279 keystone-next for hopem mp271219
    UNIT OK: passed

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

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

charm_amulet_test #6454 keystone-next for hopem mp271219
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

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

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

charm_unit_test #9556 keystone-next for hopem mp271219
    UNIT OK: passed

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

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

charm_lint_check #10412 keystone-next for hopem mp271219
    LINT OK: passed

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

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

charm_amulet_test #6550 keystone-next for hopem mp271219
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

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

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

Marking wip for 31mins to kick osci

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

charm_unit_test #10234 keystone-next for hopem mp271219
    UNIT OK: passed

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

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

charm_lint_check #11024 keystone-next for hopem mp271219
    LINT OK: passed

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

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

charm_amulet_test #6873 keystone-next for hopem mp271219
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

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

Revision history for this message
Ryan Beisner (1chb1n) wrote :
Download full text (3.2 KiB)

Amulet fail was on keystone/0 install hook, apt could not authenticate packages. Re-running the test, as it may have been an issue with the archives.

2015-09-29 12:07:40 INFO install The following packages will be upgraded:
2015-09-29 12:07:40 INFO install python-six
2015-09-29 12:07:40 INFO install 1 upgraded, 70 newly installed, 0 to remove and 15 not upgraded.
2015-09-29 12:07:40 INFO install Need to get 16.6 MB of archives.
2015-09-29 12:07:40 INFO install After this operation, 62.0 MB of additional disk space will be used.
2015-09-29 12:07:40 INFO install WARNING: The following packages cannot be authenticated!
2015-09-29 12:07:40 INFO install libcap2 libjs-underscore python-decorator python-tempita libapr1 libaprutil1
2015-09-29 12:07:40 INFO install libaprutil1-dbd-sqlite3 libaprutil1-ldap libossp-uuid16 pwgen
2015-09-29 12:07:40 INFO install python-egenix-mxtools python-egenix-mxdatetime python-formencode python-ldap
2015-09-29 12:07:40 INFO install python-openid python-paste python-pastedeploy python-pastescript
2015-09-29 12:07:40 INFO install python-psycopg2 python-routes python-scgi unison uuid python-lockfile
2015-09-29 12:07:40 INFO install python-passlib
2015-09-29 12:07:40 INFO install E: There are problems and -y was used without --force-yes
2015-09-29 12:07:40 INFO install Traceback (most recent call last):
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/install", line 624, in <module>
2015-09-29 12:07:40 INFO install main()
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/install", line 618, in main
2015-09-29 12:07:40 INFO install hooks.execute(sys.argv)
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/core/hookenv.py", line 672, in execute
2015-09-29 12:07:40 INFO install self._hooks[hook_name]()
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/install", line 120, in install
2015-09-29 12:07:40 INFO install apt_install(determine_packages(), fatal=True)
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/fetch/__init__.py", line 191, in apt_install
2015-09-29 12:07:40 INFO install _run_apt_command(cmd, fatal)
2015-09-29 12:07:40 INFO install File "/var/lib/juju/agents/unit-keystone-0/charm/hooks/charmhelpers/fetch/__init__.py", line 445, in _run_apt_command
2015-09-29 12:07:40 INFO install result = subprocess.check_call(cmd, env=env)
2015-09-29 12:07:40 INFO install File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
2015-09-29 12:07:40 INFO install raise CalledProcessError(retcode, cmd)
2015-09-29 12:07:40 INFO install subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install', 'apache2', 'haproxy', 'keystone', 'openssl', 'pwgen', 'python-keystoneclient', 'python-mysqldb', 'python-psycopg2', 'python-six', 'unison', 'uuid']' returned non-zero exit status 100
2015-09-29 12:07:40 INFO juju.worker.uniter.context context.go:543 handling reboot
2015-09-29 12:07:40 ERROR juju.worker...

Read more...

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

charm_amulet_test #6876 keystone-next for hopem mp271219
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 124
ERROR:root:Make target returned non-zero.

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

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

FYI Amulet test failure was juju bug 1335885. Added comment there, will see if we can get some heat on it.

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

charm_amulet_test #6880 keystone-next for hopem mp271219
    AMULET OK: passed

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

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

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/keystone_hooks.py'
2--- hooks/keystone_hooks.py 2015-07-22 10:39:31 +0000
3+++ hooks/keystone_hooks.py 2015-09-16 01:23:18 +0000
4@@ -499,6 +499,13 @@
5
6 if iface is not None:
7 vip_key = 'res_ks_{}_vip'.format(iface)
8+ if vip_key in vip_group:
9+ log("Resource '%s' (vip='%s') already exists in "
10+ "vip group - skipping" % (vip_key, vip),
11+ WARNING)
12+ continue
13+
14+ vip_group.append(vip_key)
15 resources[vip_key] = res_ks_vip
16 resource_params[vip_key] = (
17 'params {ip}="{vip}" cidr_netmask="{netmask}"'
18@@ -507,7 +514,6 @@
19 iface=iface,
20 netmask=netmask)
21 )
22- vip_group.append(vip_key)
23
24 if len(vip_group) >= 1:
25 relation_set(relation_id=relation_id,
26
27=== modified file 'unit_tests/test_keystone_hooks.py'
28--- unit_tests/test_keystone_hooks.py 2015-08-14 16:10:45 +0000
29+++ unit_tests/test_keystone_hooks.py 2015-09-16 01:23:18 +0000
30@@ -657,6 +657,30 @@
31 }
32 self.relation_set.assert_called_with(**args)
33
34+ def test_ha_joined_duplicate_vip_key(self):
35+ self.get_hacluster_config.return_value = {
36+ 'vip': '10.10.10.10 10.10.10.11',
37+ 'ha-bindiface': 'em0',
38+ 'ha-mcastport': '8080'
39+ }
40+ self.get_iface_for_address.return_value = 'em1'
41+ self.get_netmask_for_address.return_value = '255.255.255.0'
42+ hooks.ha_joined()
43+ args = {
44+ 'relation_id': None,
45+ 'corosync_bindiface': 'em0',
46+ 'corosync_mcastport': '8080',
47+ 'init_services': {'res_ks_haproxy': 'haproxy'},
48+ 'resources': {'res_ks_em1_vip': 'ocf:heartbeat:IPaddr2',
49+ 'res_ks_haproxy': 'lsb:haproxy'},
50+ 'resource_params': {
51+ 'res_ks_em1_vip': 'params ip="10.10.10.10"'
52+ ' cidr_netmask="255.255.255.0" nic="em1"',
53+ 'res_ks_haproxy': 'op monitor interval="5s"'},
54+ 'clones': {'cl_ks_haproxy': 'res_ks_haproxy'}
55+ }
56+ self.relation_set.assert_called_with(**args)
57+
58 def test_ha_joined_no_bound_ip(self):
59 self.get_hacluster_config.return_value = {
60 'vip': '10.10.10.10',

Subscribers

People subscribed via source and target branches