Merge lp:~james-page/charms/trusty/neutron-api/wily into lp:~openstack-charmers-archive/charms/trusty/neutron-api/next

Proposed by James Page on 2015-09-22
Status: Merged
Merged at revision: 142
Proposed branch: lp:~james-page/charms/trusty/neutron-api/wily
Merge into: lp:~openstack-charmers-archive/charms/trusty/neutron-api/next
Diff against target: 40 lines (+21/-1)
2 files modified
hooks/install (+20/-0)
hooks/neutron_api_hooks.py (+1/-1)
To merge this branch: bzr merge lp:~james-page/charms/trusty/neutron-api/wily
Reviewer Review Type Date Requested Status
Ryan Beisner Needs Information on 2015-09-22
Liam Young 2015-09-22 Approve on 2015-09-22
Review via email: mp+271917@code.launchpad.net

Description of the Change

python2 detection and install wrapper for wily onwards, where py2 is not installed by default.

This is really a placeholder to switch between py2 and py3 dynamically, but we need to test and update the codebase first before we can make that type of switch.

To post a comment you must log in.

charm_lint_check #10429 neutron-api-next for james-page mp271917
    LINT OK: passed

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

charm_unit_test #9620 neutron-api-next for james-page mp271917
    UNIT OK: passed

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

charm_amulet_test #6572 neutron-api-next for james-page mp271917
    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/12519969/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6572/

144. By James Page on 2015-09-22

Split out install hook instead

145. By James Page on 2015-09-22

Fixup install hook execution

146. By James Page on 2015-09-22

Exec install.real

charm_lint_check #10432 neutron-api-next for james-page mp271917
    LINT OK: passed

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

charm_unit_test #9624 neutron-api-next for james-page mp271917
    UNIT OK: passed

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

Liam Young (gnuoy) wrote :

Approve

review: Approve

charm_unit_test #9627 neutron-api-next for james-page mp271917
    UNIT OK: passed

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

Ryan Beisner (1chb1n) wrote :

On that ^ n-api amulet test fail, precise-icehouse timed out (45 minutes), stuck @: neutron-openvswitch/0 maintenance executing (config-changed) installing charm software;

I'm not sure if that was an infra hiccup or indicative of a real issue.

I re-triggered the test, and that run is also stuck at the same place:

00:12:56.675 2015-09-22 13:19:34 Adding relation neutron-api:neutron-plugin-api <-> neutron-openvswitch:neutron-plugin-api

http://paste.ubuntu.com/12521217/

Further testing and confirmation is recommended before landing.

review: Needs Information

charm_amulet_test #6575 neutron-api-next for james-page mp271917
    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/12521240/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6575/

charm_amulet_test #6581 neutron-api-next for james-page mp271917
    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/12521600/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6581/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified symlink 'hooks/install' (properties changed: -x to +x)
2=== target was u'neutron_api_hooks.py'
3--- hooks/install 1970-01-01 00:00:00 +0000
4+++ hooks/install 2015-09-22 13:00:52 +0000
5@@ -0,0 +1,20 @@
6+#!/bin/bash
7+# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
8+# by default.
9+
10+declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml')
11+
12+check_and_install() {
13+ pkg="${1}-${2}"
14+ if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
15+ apt-get -y install ${pkg}
16+ fi
17+}
18+
19+PYTHON="python"
20+
21+for dep in ${DEPS[@]}; do
22+ check_and_install ${PYTHON} ${dep}
23+done
24+
25+exec ./hooks/install.real
26
27=== added symlink 'hooks/install.real'
28=== target is u'neutron_api_hooks.py'
29=== modified file 'hooks/neutron_api_hooks.py'
30--- hooks/neutron_api_hooks.py 2015-09-04 11:03:14 +0000
31+++ hooks/neutron_api_hooks.py 2015-09-22 13:00:52 +0000
32@@ -142,7 +142,7 @@
33 identity_joined(rid=rid)
34
35
36-@hooks.hook()
37+@hooks.hook('install.real')
38 def install():
39 execd_preinstall()
40 configure_installation_source(config('openstack-origin'))

Subscribers

People subscribed via source and target branches