Merge lp:~gnuoy/charms/trusty/openvswitch-odl/duplicate-controllers into lp:~openstack-charmers-archive/charms/trusty/openvswitch-odl/next

Proposed by Liam Young on 2015-12-02
Status: Merged
Merged at revision: 7
Proposed branch: lp:~gnuoy/charms/trusty/openvswitch-odl/duplicate-controllers
Merge into: lp:~openstack-charmers-archive/charms/trusty/openvswitch-odl/next
Diff against target: 47 lines (+9/-5)
2 files modified
Makefile (+3/-1)
tests/basic_deployment.py (+6/-4)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/openvswitch-odl/duplicate-controllers
Reviewer Review Type Date Requested Status
OpenStack Charmers 2015-12-02 Pending
Review via email: mp+279251@code.launchpad.net
To post a comment you must log in.

charm_lint_check #14752 openvswitch-odl-next for gnuoy mp279251
    LINT OK: passed

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

charm_unit_test #13755 openvswitch-odl-next for gnuoy mp279251
    UNIT FAIL: unit-test failed

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

Full unit test output: http://paste.ubuntu.com/13620528/
Build: http://10.245.162.77:8080/job/charm_unit_test/13755/

charm_amulet_test #8072 openvswitch-odl-next for gnuoy mp279251
    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/13620761/
Build: http://10.245.162.77:8080/job/charm_amulet_test/8072/

8. By Liam Young on 2015-12-04

Use tox for lint and unit test targets in Makefile

charm_lint_check #14874 openvswitch-odl-next for gnuoy mp279251
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 127
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/13665191/
Build: http://10.245.162.77:8080/job/charm_lint_check/14874/

charm_unit_test #13871 openvswitch-odl-next for gnuoy mp279251
    UNIT FAIL: unit-test missing

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

Full unit test output: http://paste.ubuntu.com/13665192/
Build: http://10.245.162.77:8080/job/charm_unit_test/13871/

charm_amulet_test #8143 openvswitch-odl-next for gnuoy mp279251
    AMULET OK: passed

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

9. By Liam Young on 2015-12-07

Tox is not available on osci atm so revert to using old method with CHARM_DIR set

charm_lint_check #15038 openvswitch-odl-next for gnuoy mp279251
    LINT OK: passed

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

charm_unit_test #14026 openvswitch-odl-next for gnuoy mp279251
    UNIT OK: passed

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

charm_amulet_test #8201 openvswitch-odl-next for gnuoy mp279251
    AMULET OK: passed

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2015-11-16 08:33:32 +0000
3+++ Makefile 2015-12-07 07:37:57 +0000
4@@ -1,5 +1,7 @@
5 #!/usr/bin/make
6 PYTHON := /usr/bin/env python
7+CHARM_DIR := $(pwd)
8+export CHARM_DIR
9
10 lint:
11 @flake8 --exclude hooks/charmhelpers,tests/charmhelpers \
12@@ -8,7 +10,7 @@
13
14 test:
15 @# Bundletester expects unit tests here.
16- @echo Starting tests...
17+ @echo Starting unit tests...
18 @$(PYTHON) /usr/bin/nosetests -v --nologcapture --with-coverage unit_tests
19
20 functional_test:
21
22=== modified file 'tests/basic_deployment.py'
23--- tests/basic_deployment.py 2015-11-12 19:17:39 +0000
24+++ tests/basic_deployment.py 2015-12-07 07:37:57 +0000
25@@ -217,16 +217,18 @@
26 msg="Missing bridge {} from gateway unit".format(bridge)
27 )
28 cmd = 'ovs-vsctl get-controller {}'.format(bridge)
29- br_controller, _ = self.gateway_sentry.run(cmd)
30- br_controller = br_controller.strip()
31- if br_controller != controller_url:
32+ br_controllers, _ = self.gateway_sentry.run(cmd)
33+ # Beware of duplicate entries:
34+ # https://bugs.opendaylight.org/show_bug.cgi?id=960
35+ br_controllers = list(set(br_controllers.split('\n')))
36+ if len(br_controllers) != 1 or br_controllers[0] != controller_url:
37 status, _ = self.gateway_sentry.run('ovs-vsctl show')
38 amulet.raise_status(
39 amulet.FAIL,
40 msg="Controller configuration on bridge"
41 " {} incorrect: {} != {}\n"
42 "{}".format(bridge,
43- br_controller,
44+ br_controllers,
45 controller_url,
46 status)
47 )

Subscribers

People subscribed via source and target branches

to all changes: