Merge lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Liam Young
Status: Merged
Merged at revision: 150
Proposed branch: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 919 lines (+554/-91)
16 files modified
hooks/charmhelpers/contrib/openstack/amulet/deployment.py (+25/-2)
hooks/charmhelpers/contrib/openstack/context.py (+144/-1)
hooks/charmhelpers/contrib/openstack/templates/git.upstart (+13/-0)
hooks/charmhelpers/contrib/openstack/templates/section-zeromq (+14/-0)
hooks/charmhelpers/contrib/openstack/templates/zeromq (+0/-14)
hooks/charmhelpers/contrib/openstack/utils.py (+124/-69)
hooks/charmhelpers/core/unitdata.py (+1/-1)
hooks/nova_cc_hooks.py (+20/-2)
hooks/nova_cc_utils.py (+9/-0)
metadata.yaml (+3/-0)
templates/icehouse/neutron.conf (+2/-0)
templates/juno/nova.conf (+156/-0)
templates/kilo/nova.conf (+2/-0)
templates/kilo/zeromq (+14/-0)
tests/charmhelpers/contrib/openstack/amulet/deployment.py (+25/-2)
unit_tests/test_nova_cc_hooks.py (+2/-0)
To merge this branch: bzr merge lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Ryan Beisner (community) Needs Fixing
James Page Needs Fixing
Review via email: mp+238878@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#694 nova-cloud-controller-next for gnuoy mp238878
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/694/

MP URL:
https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878

Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

Results summary:
    LINT FAIL: lint-check failed

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.694:
hooks/nova_cc_hooks.py:64:1: F811 redefinition of unused 'services' from line 64
make: *** [lint] Error 1

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#500 nova-cloud-controller-next for gnuoy mp238878
charm_unit_test

This build:
http://10.98.191.181:8080/job/charm_unit_test/500/

MP URL:
https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878

Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

Results summary:
    UNIT FAIL: unit-test failed

UNIT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.500:
    return func(*args, **keywargs)
  File "/var/lib/jenkins/checkout/nova-cloud-controller/unit_tests/test_nova_cc_hooks.py", line 117, in test_config_changed_with_upgrade
    hooks.config_changed()
  File "hooks/nova_cc_utils.py", line 896, in wrapped_f
    f(*args)
  File "hooks/charmhelpers/core/host.py", line 269, in wrapped_f
    f(*args)
  File "hooks/nova_cc_hooks.py", line 172, in config_changed
    zeromq_configuration_relation_joined(rid)
  File "hooks/charmhelpers/contrib/openstack/utils.py", line 507, in wrapped_f
    " before %s" % ostack_release)
Exception: This hook is not supported on releases before juno

Name Stmts Miss Cover Missing
-----------------------------------------------------
hooks/nova_cc_context 151 109 28% 21-28, 39-41, 48-59, 65-79, 86-104, 116-169, 180-195, 203-204, 208, 212-214, 219, 222-236, 242-256, 273-276, 281-283
hooks/nova_cc_hooks 453 147 68% 135-138, 151-152, 178, 189-190, 194, 229, 234-239, 250, 330-333, 341-344, 350-353, 363-379, 388-390, 400-414, 418-427, 513, 523, 527-528, 581, 587-597, 602-613, 623-633, 638-677, 687-702, 710-714, 739-748, 772, 777-785, 811, 863, 871, 875-878
hooks/nova_cc_utils 447 115 74% 296-301, 312-315, 325-326, 382, 384, 428-430, 434, 448-456, 463-468, 472-486, 592-594, 599-602, 607, 611, 635-636, 650-652, 673-674, 680-703, 707-713, 717-723, 729, 735, 742, 753-757, 842, 902-905, 909-915, 919-921, 925-928, 932-944
-----------------------------------------------------
TOTAL 1051 371 65%
----------------------------------------------------------------------
Ran 97 tests in 10.713s

FAILED (errors=1)
make: *** [unit_test] Error 1

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

108. By Liam Young

Fix unit tests and lint

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#702 nova-cloud-controller-next for gnuoy mp238878
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/702/

MP URL:
https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878

Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

Results summary:
    LINT OK: believed to pass, but you should confirm results

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.702:
I: relation cloud-controller has no hooks
I: config.yaml: option ssl_key has no default value
I: config.yaml: option nvp-tz-uuid has no default value
I: config.yaml: option vip has no default value
I: config.yaml: option nvp-controllers has no default value
I: config.yaml: option console-access-protocol has no default value
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 haproxy-server-timeout has no default value
I: config.yaml: option os-admin-network has no default value
I: config.yaml: option haproxy-client-timeout has no default value
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#508 nova-cloud-controller-next for gnuoy mp238878
charm_unit_test

This build:
http://10.98.191.181:8080/job/charm_unit_test/508/

MP URL:
https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878

Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

Results summary:
    UNIT OK: believed to pass, but you should confirm results

UNIT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.508:
Ensure services with incomplete interfaces are stopped ... ok
Ensure services with complete interfaces are not stopped ... ok
Ensure that if disabled, service guards nothing ... ok
test_ssh_authorized_key_doesnt_exist (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_authorized_key_exists (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_compute_remove (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_directory_for_unit (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
test_ssh_known_host_key (unit_tests.test_nova_cc_utils.NovaCCUtilsTests) ... ok
Simulate a call to do_openstack_upgrade() for grizzly->icehouse ... ok
Verify get_step_upgrade_source() for grizzly->icehouse ... ok
Simulate a call to do_openstack_upgrade() for havana->icehouse ... ok
Simulate a call to do_openstack_upgrade() for havana->icehouse api ... ok
Verify get_step_upgrade_source() for havana->icehouse ... ok

Name Stmts Miss Cover Missing
-----------------------------------------------------
hooks/nova_cc_context 151 109 28% 21-28, 39-41, 48-59, 65-79, 86-104, 116-169, 180-195, 203-204, 208, 212-214, 219, 222-236, 242-256, 273-276, 281-283
hooks/nova_cc_hooks 453 147 68% 134-137, 150-151, 177, 188-189, 193, 228, 233-238, 249, 329-332, 340-343, 349-352, 362-378, 387-389, 399-413, 417-426, 512, 522, 526-527, 580, 586-596, 601-612, 622-632, 637-676, 686-701, 709-713, 738-747, 771, 776-784, 810, 862, 870, 874-877
hooks/nova_cc_utils 447 115 74% 296-301, 312-315, 325-326, 382, 384, 428-430, 434, 448-456, 463-468, 472-486, 592-594, 599-602, 607, 611, 635-636, 650-652, 673-674, 680-703, 707-713, 717-723, 729, 735, 742, 753-757, 842, 902-905, 909-915, 919-921, 925-928, 932-944
-----------------------------------------------------
TOTAL 1051 371 65%
----------------------------------------------------------------------
Ran 97 tests in 8.907s

OK

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

109. By James Page

Rebase on target

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

UOSCI bot says: This MP triggered a test on the Ubuntu OSCI system.

charm_lint_check #166 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: believed to pass, but you should confirm results

Build: http://10.98.191.152:8080/job/charm_lint_check/166/
MP: https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878
Proposed: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

LINT Results (max last 4 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.166:
I: config.yaml: option haproxy-client-timeout has no default value
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value
Full lint result: http://paste.ubuntu.com/8616250/

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

UOSCI bot says: This MP triggered a test on the Ubuntu OSCI system.

charm_unit_test #101 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: believed to pass, but you should confirm results

Build: http://10.98.191.152:8080/job/charm_unit_test/101/
MP: https://code.launchpad.net/~openstack-charmers/charms/trusty/nova-cloud-controller/0mq/+merge/238878
Proposed: lp:~openstack-charmers/charms/trusty/nova-cloud-controller/0mq

UNIT Results (max last 4 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.101:
----------------------------------------------------------------------
Ran 97 tests in 9.282s

OK
Full unit result: http://paste.ubuntu.com/8616251/

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

UOSCI bot says:
charm_lint_check #725 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: believed to pass, but you should confirm results

LINT Results (max last 4 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.725:
I: config.yaml: option haproxy-client-timeout has no default value
I: config.yaml: option ssl_cert has no default value
I: config.yaml: option nvp-l3-uuid has no default value
I: config.yaml: option os-internal-network has no default value

Full lint output: http://paste.ubuntu.com/8616276/
Build: http://10.98.191.181:8080/job/charm_lint_check/725/

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

UOSCI bot says:
charm_unit_test #531 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: believed to pass, but you should confirm results

UNIT Results (max last 4 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.531:
----------------------------------------------------------------------
Ran 97 tests in 9.073s

OK

Full unit output: http://paste.ubuntu.com/8616278/
Build: http://10.98.191.181:8080/job/charm_unit_test/531/

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

UOSCI bot says:
charm_amulet_test #279 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: believed to pass, but you should confirm results

AMULET Results (max last 4 lines) from
/var/lib/jenkins/workspace/charm_amulet_test/make-test.279:
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 output: http://paste.ubuntu.com/8616479/
Build: http://10.98.191.181:8080/job/charm_amulet_test/279/

Revision history for this message
James Page (james-page) :
review: Needs Fixing
110. By James Page

Rebase on next

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

charm_lint_check #164 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #198 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #178 nova-cloud-controller-next for gnuoy mp238878
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 124
  make: *** [test] Error 124

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

111. By James Page

Rebase on next

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

charm_unit_test #737 nova-cloud-controller-next for gnuoy mp238878
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
  FAILED (errors=1, failures=2)
  make: *** [unit_test] Error 1

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

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

charm_lint_check #708 nova-cloud-controller-next for gnuoy mp238878
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
  hooks/nova_cc_hooks.py:862:1: E302 expected 2 blank lines, found 0
  make: *** [lint] Error 1

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

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

charm_amulet_test #893 nova-cloud-controller-next for gnuoy mp238878
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

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

FYI, more info from juju unit log re: n-c-c install hook fail:

2015-01-13 09:41:49 INFO juju.worker.uniter modes.go:65 found queued "install" hook
2015-01-13 09:41:49 INFO juju.worker.uniter uniter.go:480 running "install" hook
2015-01-13 09:41:49 INFO install File "/var/lib/juju/agents/unit-nova-cloud-controller-0/charm/hooks/install", line 861
2015-01-13 09:41:49 INFO install <<<<<<< TREE
2015-01-13 09:41:49 INFO install ^
2015-01-13 09:41:49 INFO install SyntaxError: invalid syntax
2015-01-13 09:41:49 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1

review: Needs Fixing
112. By James Page

Fixup merge problem

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

charm_lint_check #793 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #822 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #978 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: passed

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

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

FYI - P, T, U deploy tests fail with http://paste.ubuntu.com/9761904/

review: Needs Fixing
113. By James Page

Use centralized zeromq template

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

charm_lint_check #840 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #869 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #1064 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: passed

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

114. By James Page

Fixup zeromq sections

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

charm_lint_check #845 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #874 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #1069 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: passed

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

115. By James Page

Resync helper

116. By James Page

Resync helper

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

charm_lint_check #868 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #897 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #1092 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: passed

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

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

charm_lint_check #874 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #903 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #1098 nova-cloud-controller-next for gnuoy mp238878
    AMULET OK: passed

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

117. By James Page

Rebase and resync

118. By James Page

Add zeromq support for kilo

119. By James Page

Use nova package for os check

120. By James Page

Drop zeromq support in icehouse

121. By James Page

Mark juno template as juno

122. By James Page

Move zeromq section to correct part of file

123. By James Page

Specialized zeromq snippet for kilo

124. By James Page

Reorder zeromq inclusion

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

charm_lint_check #2202 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #1991 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #2148 nova-cloud-controller-next for gnuoy mp238878
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

125. By James Page

Rebase

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

charm_lint_check #2682 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #2473 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #2511 nova-cloud-controller-next for gnuoy mp238878
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

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

126. By James Page

Make 0mq support >= kilo

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

charm_lint_check #2692 nova-cloud-controller-next for gnuoy mp238878
    LINT OK: passed

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

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

charm_unit_test #2483 nova-cloud-controller-next for gnuoy mp238878
    UNIT OK: passed

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

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

charm_amulet_test #2521 nova-cloud-controller-next for gnuoy mp238878
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 124
  make: *** [test] Error 124

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

127. By James Page

Rebase, resync

128. By James Page

Rebase

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

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/charmhelpers/contrib/openstack/amulet/deployment.py'
--- hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 11:39:19 +0000
+++ hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 14:56:40 +0000
@@ -15,6 +15,7 @@
15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
1616
17import six17import six
18from collections import OrderedDict
18from charmhelpers.contrib.amulet.deployment import (19from charmhelpers.contrib.amulet.deployment import (
19 AmuletDeployment20 AmuletDeployment
20)21)
@@ -100,12 +101,34 @@
100 """101 """
101 (self.precise_essex, self.precise_folsom, self.precise_grizzly,102 (self.precise_essex, self.precise_folsom, self.precise_grizzly,
102 self.precise_havana, self.precise_icehouse,103 self.precise_havana, self.precise_icehouse,
103 self.trusty_icehouse) = range(6)104 self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8)
104 releases = {105 releases = {
105 ('precise', None): self.precise_essex,106 ('precise', None): self.precise_essex,
106 ('precise', 'cloud:precise-folsom'): self.precise_folsom,107 ('precise', 'cloud:precise-folsom'): self.precise_folsom,
107 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,108 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
108 ('precise', 'cloud:precise-havana'): self.precise_havana,109 ('precise', 'cloud:precise-havana'): self.precise_havana,
109 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,110 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
110 ('trusty', None): self.trusty_icehouse}111 ('trusty', None): self.trusty_icehouse,
112 ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
113 ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
111 return releases[(self.series, self.openstack)]114 return releases[(self.series, self.openstack)]
115
116 def _get_openstack_release_string(self):
117 """Get openstack release string.
118
119 Return a string representing the openstack release.
120 """
121 releases = OrderedDict([
122 ('precise', 'essex'),
123 ('quantal', 'folsom'),
124 ('raring', 'grizzly'),
125 ('saucy', 'havana'),
126 ('trusty', 'icehouse'),
127 ('utopic', 'juno'),
128 ('vivid', 'kilo'),
129 ])
130 if self.openstack:
131 os_origin = self.openstack.split(':')[1]
132 return os_origin.split('%s-' % self.series)[1].split('/')[0]
133 else:
134 return releases[self.series]
112135
=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
--- hooks/charmhelpers/contrib/openstack/context.py 2015-03-31 11:39:19 +0000
+++ hooks/charmhelpers/contrib/openstack/context.py 2015-03-31 14:56:40 +0000
@@ -47,6 +47,7 @@
47)47)
4848
49from charmhelpers.core.sysctl import create as sysctl_create49from charmhelpers.core.sysctl import create as sysctl_create
50from charmhelpers.core.strutils import bool_from_string
5051
51from charmhelpers.core.host import (52from charmhelpers.core.host import (
52 list_nics,53 list_nics,
@@ -67,6 +68,7 @@
67)68)
68from charmhelpers.contrib.openstack.neutron import (69from charmhelpers.contrib.openstack.neutron import (
69 neutron_plugin_attribute,70 neutron_plugin_attribute,
71 parse_data_port_mappings,
70)72)
71from charmhelpers.contrib.openstack.ip import (73from charmhelpers.contrib.openstack.ip import (
72 resolve_address,74 resolve_address,
@@ -82,7 +84,6 @@
82 is_bridge_member,84 is_bridge_member,
83)85)
84from charmhelpers.contrib.openstack.utils import get_host_ip86from charmhelpers.contrib.openstack.utils import get_host_ip
85
86CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'87CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'
87ADDRESS_TYPES = ['admin', 'internal', 'public']88ADDRESS_TYPES = ['admin', 'internal', 'public']
8889
@@ -1162,3 +1163,145 @@
1162 sysctl_create(sysctl_dict,1163 sysctl_create(sysctl_dict,
1163 '/etc/sysctl.d/50-{0}.conf'.format(charm_name()))1164 '/etc/sysctl.d/50-{0}.conf'.format(charm_name()))
1164 return {'sysctl': sysctl_dict}1165 return {'sysctl': sysctl_dict}
1166
1167
1168class NeutronAPIContext(OSContextGenerator):
1169 '''
1170 Inspects current neutron-plugin-api relation for neutron settings. Return
1171 defaults if it is not present.
1172 '''
1173 interfaces = ['neutron-plugin-api']
1174
1175 def __call__(self):
1176 self.neutron_defaults = {
1177 'l2_population': {
1178 'rel_key': 'l2-population',
1179 'default': False,
1180 },
1181 'overlay_network_type': {
1182 'rel_key': 'overlay-network-type',
1183 'default': 'gre',
1184 },
1185 'neutron_security_groups': {
1186 'rel_key': 'neutron-security-groups',
1187 'default': False,
1188 },
1189 'network_device_mtu': {
1190 'rel_key': 'network-device-mtu',
1191 'default': None,
1192 },
1193 'enable_dvr': {
1194 'rel_key': 'enable-dvr',
1195 'default': False,
1196 },
1197 'enable_l3ha': {
1198 'rel_key': 'enable-l3ha',
1199 'default': False,
1200 },
1201 }
1202 ctxt = self.get_neutron_options({})
1203 for rid in relation_ids('neutron-plugin-api'):
1204 for unit in related_units(rid):
1205 rdata = relation_get(rid=rid, unit=unit)
1206 if 'l2-population' in rdata:
1207 ctxt.update(self.get_neutron_options(rdata))
1208
1209 return ctxt
1210
1211 def get_neutron_options(self, rdata):
1212 settings = {}
1213 for nkey in self.neutron_defaults.keys():
1214 defv = self.neutron_defaults[nkey]['default']
1215 rkey = self.neutron_defaults[nkey]['rel_key']
1216 if rkey in rdata.keys():
1217 if type(defv) is bool:
1218 settings[nkey] = bool_from_string(rdata[rkey])
1219 else:
1220 settings[nkey] = rdata[rkey]
1221 else:
1222 settings[nkey] = defv
1223 return settings
1224
1225
1226class ExternalPortContext(NeutronPortContext):
1227
1228 def __call__(self):
1229 ctxt = {}
1230 ports = config('ext-port')
1231 if ports:
1232 ports = [p.strip() for p in ports.split()]
1233 ports = self.resolve_ports(ports)
1234 if ports:
1235 ctxt = {"ext_port": ports[0]}
1236 napi_settings = NeutronAPIContext()()
1237 mtu = napi_settings.get('network_device_mtu')
1238 if mtu:
1239 ctxt['ext_port_mtu'] = mtu
1240
1241 return ctxt
1242
1243
1244class DataPortContext(NeutronPortContext):
1245
1246 def __call__(self):
1247 ports = config('data-port')
1248 if ports:
1249 portmap = parse_data_port_mappings(ports)
1250 ports = portmap.values()
1251 resolved = self.resolve_ports(ports)
1252 normalized = {get_nic_hwaddr(port): port for port in resolved
1253 if port not in ports}
1254 normalized.update({port: port for port in resolved
1255 if port in ports})
1256 if resolved:
1257 return {bridge: normalized[port] for bridge, port in
1258 six.iteritems(portmap) if port in normalized.keys()}
1259
1260 return None
1261
1262
1263class PhyNICMTUContext(DataPortContext):
1264
1265 def __call__(self):
1266 ctxt = {}
1267 mappings = super(PhyNICMTUContext, self).__call__()
1268 if mappings and mappings.values():
1269 ports = mappings.values()
1270 napi_settings = NeutronAPIContext()()
1271 mtu = napi_settings.get('network_device_mtu')
1272 if mtu:
1273 ctxt["devs"] = '\\n'.join(ports)
1274 ctxt['mtu'] = mtu
1275
1276 return ctxt
1277
1278
1279class NetworkServiceContext(OSContextGenerator):
1280
1281 def __init__(self, rel_name='quantum-network-service'):
1282 self.rel_name = rel_name
1283 self.interfaces = [rel_name]
1284
1285 def __call__(self):
1286 for rid in relation_ids(self.rel_name):
1287 for unit in related_units(rid):
1288 rdata = relation_get(rid=rid, unit=unit)
1289 ctxt = {
1290 'keystone_host': rdata.get('keystone_host'),
1291 'service_port': rdata.get('service_port'),
1292 'auth_port': rdata.get('auth_port'),
1293 'service_tenant': rdata.get('service_tenant'),
1294 'service_username': rdata.get('service_username'),
1295 'service_password': rdata.get('service_password'),
1296 'quantum_host': rdata.get('quantum_host'),
1297 'quantum_port': rdata.get('quantum_port'),
1298 'quantum_url': rdata.get('quantum_url'),
1299 'region': rdata.get('region'),
1300 'service_protocol':
1301 rdata.get('service_protocol') or 'http',
1302 'auth_protocol':
1303 rdata.get('auth_protocol') or 'http',
1304 }
1305 if context_complete(ctxt):
1306 return ctxt
1307 return {}
11651308
=== added file 'hooks/charmhelpers/contrib/openstack/templates/git.upstart'
--- hooks/charmhelpers/contrib/openstack/templates/git.upstart 1970-01-01 00:00:00 +0000
+++ hooks/charmhelpers/contrib/openstack/templates/git.upstart 2015-03-31 14:56:40 +0000
@@ -0,0 +1,13 @@
1description "{{ service_description }}"
2author "Juju {{ service_name }} Charm <juju@localhost>"
3
4start on runlevel [2345]
5stop on runlevel [!2345]
6
7respawn
8
9exec start-stop-daemon --start --chuid {{ user_name }} \
10 --chdir {{ start_dir }} --name {{ process_name }} \
11 --exec {{ executable_name }} -- \
12 --config-file={{ config_file }} \
13 --log-file={{ log_file }}
014
=== added file 'hooks/charmhelpers/contrib/openstack/templates/section-zeromq'
--- hooks/charmhelpers/contrib/openstack/templates/section-zeromq 1970-01-01 00:00:00 +0000
+++ hooks/charmhelpers/contrib/openstack/templates/section-zeromq 2015-03-31 14:56:40 +0000
@@ -0,0 +1,14 @@
1{% if zmq_host -%}
2# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
3rpc_backend = zmq
4rpc_zmq_host = {{ zmq_host }}
5{% if zmq_redis_address -%}
6rpc_zmq_matchmaker = redis
7matchmaker_heartbeat_freq = 15
8matchmaker_heartbeat_ttl = 30
9[matchmaker_redis]
10host = {{ zmq_redis_address }}
11{% else -%}
12rpc_zmq_matchmaker = ring
13{% endif -%}
14{% endif -%}
015
=== removed file 'hooks/charmhelpers/contrib/openstack/templates/zeromq'
--- hooks/charmhelpers/contrib/openstack/templates/zeromq 2015-02-24 12:37:34 +0000
+++ hooks/charmhelpers/contrib/openstack/templates/zeromq 1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
1{% if zmq_host -%}
2# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
3rpc_backend = zmq
4rpc_zmq_host = {{ zmq_host }}
5{% if zmq_redis_address -%}
6rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_redis.MatchMakerRedis
7matchmaker_heartbeat_freq = 15
8matchmaker_heartbeat_ttl = 30
9[matchmaker_redis]
10host = {{ zmq_redis_address }}
11{% else -%}
12rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_ring.MatchMakerRing
13{% endif -%}
14{% endif -%}
150
=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
--- hooks/charmhelpers/contrib/openstack/utils.py 2015-03-31 11:39:19 +0000
+++ hooks/charmhelpers/contrib/openstack/utils.py 2015-03-31 14:56:40 +0000
@@ -30,6 +30,10 @@
3030
31from charmhelpers.contrib.network import ip31from charmhelpers.contrib.network import ip
3232
33from charmhelpers.core import (
34 unitdata,
35)
36
33from charmhelpers.core.hookenv import (37from charmhelpers.core.hookenv import (
34 config,38 config,
35 log as juju_log,39 log as juju_log,
@@ -330,6 +334,21 @@
330 error_out("Invalid openstack-release specified: %s" % rel)334 error_out("Invalid openstack-release specified: %s" % rel)
331335
332336
337def config_value_changed(option):
338 """
339 Determine if config value changed since last call to this function.
340 """
341 hook_data = unitdata.HookData()
342 with hook_data():
343 db = unitdata.kv()
344 current = config(option)
345 saved = db.get(option)
346 db.set(option, current)
347 if saved is None:
348 return False
349 return current != saved
350
351
333def save_script_rc(script_path="scripts/scriptrc", **env_vars):352def save_script_rc(script_path="scripts/scriptrc", **env_vars):
334 """353 """
335 Write an rc file in the charm-delivered directory containing354 Write an rc file in the charm-delivered directory containing
@@ -469,82 +488,95 @@
469488
470489
471def git_install_requested():490def git_install_requested():
472 """Returns true if openstack-origin-git is specified."""491 """
473 return config('openstack-origin-git') != "None"492 Returns true if openstack-origin-git is specified.
493 """
494 return config('openstack-origin-git') is not None
474495
475496
476requirements_dir = None497requirements_dir = None
477498
478499
479def git_clone_and_install(file_name, core_project):500def git_clone_and_install(projects_yaml, core_project):
480 """Clone/install all OpenStack repos specified in yaml config file."""501 """
502 Clone/install all specified OpenStack repositories.
503
504 The expected format of projects_yaml is:
505 repositories:
506 - {name: keystone,
507 repository: 'git://git.openstack.org/openstack/keystone.git',
508 branch: 'stable/icehouse'}
509 - {name: requirements,
510 repository: 'git://git.openstack.org/openstack/requirements.git',
511 branch: 'stable/icehouse'}
512 directory: /mnt/openstack-git
513
514 The directory key is optional.
515 """
481 global requirements_dir516 global requirements_dir
517 parent_dir = '/mnt/openstack-git'
482518
483 if file_name == "None":519 if not projects_yaml:
484 return520 return
485521
486 yaml_file = os.path.join(charm_dir(), file_name)522 projects = yaml.load(projects_yaml)
487523 _git_validate_projects_yaml(projects, core_project)
488 # clone/install the requirements project first524
489 installed = _git_clone_and_install_subset(yaml_file,525 if 'directory' in projects.keys():
490 whitelist=['requirements'])526 parent_dir = projects['directory']
491 if 'requirements' not in installed:527
492 error_out('requirements git repository must be specified')528 for p in projects['repositories']:
493529 repo = p['repository']
494 # clone/install all other projects except requirements and the core project530 branch = p['branch']
495 blacklist = ['requirements', core_project]531 if p['name'] == 'requirements':
496 _git_clone_and_install_subset(yaml_file, blacklist=blacklist,532 repo_dir = _git_clone_and_install_single(repo, branch, parent_dir,
497 update_requirements=True)533 update_requirements=False)
498534 requirements_dir = repo_dir
499 # clone/install the core project535 else:
500 whitelist = [core_project]536 repo_dir = _git_clone_and_install_single(repo, branch, parent_dir,
501 installed = _git_clone_and_install_subset(yaml_file, whitelist=whitelist,537 update_requirements=True)
502 update_requirements=True)538
503 if core_project not in installed:539
504 error_out('{} git repository must be specified'.format(core_project))540def _git_validate_projects_yaml(projects, core_project):
505541 """
506542 Validate the projects yaml.
507def _git_clone_and_install_subset(yaml_file, whitelist=[], blacklist=[],543 """
508 update_requirements=False):544 _git_ensure_key_exists('repositories', projects)
509 """Clone/install subset of OpenStack repos specified in yaml config file."""545
510 global requirements_dir546 for project in projects['repositories']:
511 installed = []547 _git_ensure_key_exists('name', project.keys())
512548 _git_ensure_key_exists('repository', project.keys())
513 with open(yaml_file, 'r') as fd:549 _git_ensure_key_exists('branch', project.keys())
514 projects = yaml.load(fd)550
515 for proj, val in projects.items():551 if projects['repositories'][0]['name'] != 'requirements':
516 # The project subset is chosen based on the following 3 rules:552 error_out('{} git repo must be specified first'.format('requirements'))
517 # 1) If project is in blacklist, we don't clone/install it, period.553
518 # 2) If whitelist is empty, we clone/install everything else.554 if projects['repositories'][-1]['name'] != core_project:
519 # 3) If whitelist is not empty, we clone/install everything in the555 error_out('{} git repo must be specified last'.format(core_project))
520 # whitelist.556
521 if proj in blacklist:557
522 continue558def _git_ensure_key_exists(key, keys):
523 if whitelist and proj not in whitelist:559 """
524 continue560 Ensure that key exists in keys.
525 repo = val['repository']561 """
526 branch = val['branch']562 if key not in keys:
527 repo_dir = _git_clone_and_install_single(repo, branch,563 error_out('openstack-origin-git key \'{}\' is missing'.format(key))
528 update_requirements)564
529 if proj == 'requirements':565
530 requirements_dir = repo_dir566def _git_clone_and_install_single(repo, branch, parent_dir, update_requirements):
531 installed.append(proj)567 """
532 return installed568 Clone and install a single git repository.
533569 """
534570 dest_dir = os.path.join(parent_dir, os.path.basename(repo))
535def _git_clone_and_install_single(repo, branch, update_requirements=False):571
536 """Clone and install a single git repository."""572 if not os.path.exists(parent_dir):
537 dest_parent_dir = "/mnt/openstack-git/"573 juju_log('Directory already exists at {}. '
538 dest_dir = os.path.join(dest_parent_dir, os.path.basename(repo))574 'No need to create directory.'.format(parent_dir))
539575 os.mkdir(parent_dir)
540 if not os.path.exists(dest_parent_dir):
541 juju_log('Host dir not mounted at {}. '
542 'Creating directory there instead.'.format(dest_parent_dir))
543 os.mkdir(dest_parent_dir)
544576
545 if not os.path.exists(dest_dir):577 if not os.path.exists(dest_dir):
546 juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch))578 juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch))
547 repo_dir = install_remote(repo, dest=dest_parent_dir, branch=branch)579 repo_dir = install_remote(repo, dest=parent_dir, branch=branch)
548 else:580 else:
549 repo_dir = dest_dir581 repo_dir = dest_dir
550582
@@ -561,16 +593,39 @@
561593
562594
563def _git_update_requirements(package_dir, reqs_dir):595def _git_update_requirements(package_dir, reqs_dir):
564 """Update from global requirements.596 """
597 Update from global requirements.
565598
566 Update an OpenStack git directory's requirements.txt and599 Update an OpenStack git directory's requirements.txt and
567 test-requirements.txt from global-requirements.txt."""600 test-requirements.txt from global-requirements.txt.
601 """
568 orig_dir = os.getcwd()602 orig_dir = os.getcwd()
569 os.chdir(reqs_dir)603 os.chdir(reqs_dir)
570 cmd = "python update.py {}".format(package_dir)604 cmd = ['python', 'update.py', package_dir]
571 try:605 try:
572 subprocess.check_call(cmd.split(' '))606 subprocess.check_call(cmd)
573 except subprocess.CalledProcessError:607 except subprocess.CalledProcessError:
574 package = os.path.basename(package_dir)608 package = os.path.basename(package_dir)
575 error_out("Error updating {} from global-requirements.txt".format(package))609 error_out("Error updating {} from global-requirements.txt".format(package))
576 os.chdir(orig_dir)610 os.chdir(orig_dir)
611
612
613def git_src_dir(projects_yaml, project):
614 """
615 Return the directory where the specified project's source is located.
616 """
617 parent_dir = '/mnt/openstack-git'
618
619 if not projects_yaml:
620 return
621
622 projects = yaml.load(projects_yaml)
623
624 if 'directory' in projects.keys():
625 parent_dir = projects['directory']
626
627 for p in projects['repositories']:
628 if p['name'] == project:
629 return os.path.join(parent_dir, os.path.basename(p['repository']))
630
631 return None
577632
=== modified file 'hooks/charmhelpers/core/unitdata.py'
--- hooks/charmhelpers/core/unitdata.py 2015-02-19 04:28:27 +0000
+++ hooks/charmhelpers/core/unitdata.py 2015-03-31 14:56:40 +0000
@@ -443,7 +443,7 @@
443 data = hookenv.execution_environment()443 data = hookenv.execution_environment()
444 self.conf = conf_delta = self.kv.delta(data['conf'], 'config')444 self.conf = conf_delta = self.kv.delta(data['conf'], 'config')
445 self.rels = rels_delta = self.kv.delta(data['rels'], 'rels')445 self.rels = rels_delta = self.kv.delta(data['rels'], 'rels')
446 self.kv.set('env', data['env'])446 self.kv.set('env', dict(data['env']))
447 self.kv.set('unit', data['unit'])447 self.kv.set('unit', data['unit'])
448 self.kv.set('relid', data.get('relid'))448 self.kv.set('relid', data.get('relid'))
449 return conf_delta, rels_delta449 return conf_delta, rels_delta
450450
=== modified file 'hooks/nova_cc_hooks.py'
--- hooks/nova_cc_hooks.py 2015-03-31 11:39:19 +0000
+++ hooks/nova_cc_hooks.py 2015-03-31 14:56:40 +0000
@@ -46,6 +46,7 @@
46 configure_installation_source,46 configure_installation_source,
47 openstack_upgrade_available,47 openstack_upgrade_available,
48 os_release,48 os_release,
49 os_requires_version,
49 sync_db_with_multi_ipv6_addresses50 sync_db_with_multi_ipv6_addresses
50)51)
5152
@@ -79,6 +80,7 @@
79 migrate_nova_database,80 migrate_nova_database,
80 neutron_plugin,81 neutron_plugin,
81 save_script_rc,82 save_script_rc,
83 services,
82 ssh_compute_add,84 ssh_compute_add,
83 ssh_compute_remove,85 ssh_compute_remove,
84 ssh_known_hosts_lines,86 ssh_known_hosts_lines,
@@ -94,8 +96,8 @@
94 console_attributes,96 console_attributes,
95 service_guard,97 service_guard,
96 guard_map,98 guard_map,
97 services,99 get_topics,
98 setup_ipv6100 setup_ipv6,
99)101)
100102
101from charmhelpers.contrib.hahelpers.cluster import (103from charmhelpers.contrib.hahelpers.cluster import (
@@ -172,6 +174,8 @@
172 for rid in relation_ids('cloud-compute')]174 for rid in relation_ids('cloud-compute')]
173 for r_id in relation_ids('identity-service'):175 for r_id in relation_ids('identity-service'):
174 identity_joined(rid=r_id)176 identity_joined(rid=r_id)
177 for rid in relation_ids('zeromq-configuration'):
178 zeromq_configuration_relation_joined(rid)
175 [cluster_joined(rid) for rid in relation_ids('cluster')]179 [cluster_joined(rid) for rid in relation_ids('cluster')]
176 update_nrpe_config()180 update_nrpe_config()
177181
@@ -866,6 +870,14 @@
866 quantum_joined(rid=rid)870 quantum_joined(rid=rid)
867871
868872
873@hooks.hook('zeromq-configuration-relation-joined')
874@os_requires_version('kilo', 'nova-common')
875def zeromq_configuration_relation_joined(relid=None):
876 relation_set(relation_id=relid,
877 topics=" ".join(get_topics()),
878 users="nova")
879
880
869@hooks.hook('nrpe-external-master-relation-joined',881@hooks.hook('nrpe-external-master-relation-joined',
870 'nrpe-external-master-relation-changed')882 'nrpe-external-master-relation-changed')
871def update_nrpe_config():883def update_nrpe_config():
@@ -889,6 +901,12 @@
889 CONFIGS.write(NOVA_CONF)901 CONFIGS.write(NOVA_CONF)
890902
891903
904@hooks.hook('zeromq-configuration-relation-changed')
905@restart_on_change(restart_map(), stopstart=True)
906def zeromq_configuration_relation_changed():
907 CONFIGS.write(NOVA_CONF)
908
909
892def main():910def main():
893 try:911 try:
894 hooks.execute(sys.argv)912 hooks.execute(sys.argv)
895913
=== modified file 'hooks/nova_cc_utils.py'
--- hooks/nova_cc_utils.py 2015-03-31 11:39:19 +0000
+++ hooks/nova_cc_utils.py 2015-03-31 14:56:40 +0000
@@ -128,6 +128,8 @@
128 service='nova',128 service='nova',
129 service_user='nova'),129 service_user='nova'),
130 nova_cc_context.VolumeServiceContext(),130 nova_cc_context.VolumeServiceContext(),
131 context.ZeroMQContext(),
132 context.NotificationDriverContext(),
131 nova_cc_context.NovaIPv6Context(),133 nova_cc_context.NovaIPv6Context(),
132 nova_cc_context.NeutronCCContext(),134 nova_cc_context.NeutronCCContext(),
133 nova_cc_context.NovaConfigContext(),135 nova_cc_context.NovaConfigContext(),
@@ -928,6 +930,13 @@
928 return wrap930 return wrap
929931
930932
933def get_topics():
934 topics = ['scheduler', 'conductor']
935 if 'nova-consoleauth' in services():
936 topics.append('consoleauth')
937 return topics
938
939
931def cmd_all_services(cmd):940def cmd_all_services(cmd):
932 if cmd == 'start':941 if cmd == 'start':
933 for svc in services():942 for svc in services():
934943
=== added symlink 'hooks/zeromq-configuration-relation-changed'
=== target is u'nova_cc_hooks.py'
=== added symlink 'hooks/zeromq-configuration-relation-joined'
=== target is u'nova_cc_hooks.py'
=== modified file 'metadata.yaml'
--- metadata.yaml 2015-01-09 15:47:07 +0000
+++ metadata.yaml 2015-03-31 14:56:40 +0000
@@ -45,6 +45,9 @@
45 scope: container45 scope: container
46 memcache:46 memcache:
47 interface: memcache47 interface: memcache
48 zeromq-configuration:
49 interface: zeromq-configuration
50 scope: container
48peers:51peers:
49 cluster:52 cluster:
50 interface: nova-ha53 interface: nova-ha
5154
=== modified file 'templates/icehouse/neutron.conf'
--- templates/icehouse/neutron.conf 2015-02-20 10:21:52 +0000
+++ templates/icehouse/neutron.conf 2015-03-31 14:56:40 +0000
@@ -7,7 +7,9 @@
7lock_path = $state_path/lock7lock_path = $state_path/lock
8bind_host = {{ bind_host }}8bind_host = {{ bind_host }}
9auth_strategy = keystone9auth_strategy = keystone
10{% if notifications == 'True' -%}
10notification_driver = neutron.openstack.common.notifier.rpc_notifier11notification_driver = neutron.openstack.common.notifier.rpc_notifier
12{% endif -%}
11api_workers = {{ workers }}13api_workers = {{ workers }}
12use_syslog = {{ use_syslog }}14use_syslog = {{ use_syslog }}
1315
1416
=== added directory 'templates/juno'
=== added file 'templates/juno/nova.conf'
--- templates/juno/nova.conf 1970-01-01 00:00:00 +0000
+++ templates/juno/nova.conf 2015-03-31 14:56:40 +0000
@@ -0,0 +1,156 @@
1# juno
2###############################################################################
3# [ WARNING ]
4# Configuration file maintained by Juju. Local changes may be overwritten.
5###############################################################################
6[DEFAULT]
7verbose={{ verbose }}
8debug={{ debug }}
9dhcpbridge_flagfile=/etc/nova/nova.conf
10dhcpbridge=/usr/bin/nova-dhcpbridge
11logdir=/var/log/nova
12state_path=/var/lib/nova
13lock_path=/var/lock/nova
14force_dhcp_release=True
15iscsi_helper=tgtadm
16libvirt_use_virtio_for_bridges=True
17connection_type=libvirt
18root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
19ec2_private_dns_show_ip=True
20api_paste_config=/etc/nova/api-paste.ini
21volumes_path=/var/lib/nova/volumes
22enabled_apis=ec2,osapi_compute,metadata
23auth_strategy=keystone
24compute_driver=libvirt.LibvirtDriver
25use_ipv6 = {{ use_ipv6 }}
26osapi_compute_listen = {{ bind_host }}
27metadata_host = {{ bind_host }}
28s3_listen = {{ bind_host }}
29ec2_listen = {{ bind_host }}
30
31osapi_compute_workers = {{ workers }}
32ec2_workers = {{ workers }}
33
34scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
35cpu_allocation_ratio = {{ cpu_allocation_ratio }}
36ram_allocation_ratio = {{ ram_allocation_ratio }}
37
38use_syslog={{ use_syslog }}
39my_ip = {{ host_ip }}
40
41{% if memcached_servers %}
42memcached_servers = {{ memcached_servers }}
43{% endif %}
44
45{% if keystone_ec2_url -%}
46keystone_ec2_url = {{ keystone_ec2_url }}
47{% endif -%}
48
49{% include "parts/rabbitmq" %}
50
51{% if glance_api_servers -%}
52glance_api_servers = {{ glance_api_servers }}
53{% endif -%}
54
55{% if rbd_pool -%}
56rbd_pool = {{ rbd_pool }}
57rbd_user = {{ rbd_user }}
58rbd_secret_uuid = {{ rbd_secret_uuid }}
59{% endif -%}
60
61{% if neutron_plugin and neutron_plugin == 'ovs' -%}
62libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
63libvirt_user_virtio_for_bridges = True
64{% if neutron_security_groups -%}
65security_group_api = {{ network_manager }}
66nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
67{% endif -%}
68{% if external_network -%}
69default_floating_pool = {{ external_network }}
70{% endif -%}
71{% endif -%}
72
73{% if neutron_plugin and neutron_plugin == 'nvp' -%}
74security_group_api = neutron
75nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
76{% if external_network -%}
77default_floating_pool = {{ external_network }}
78{% endif -%}
79{% endif -%}
80
81{% if network_manager_config -%}
82{% for key, value in network_manager_config.iteritems() -%}
83{{ key }} = {{ value }}
84{% endfor -%}
85{% endif -%}
86
87{% if network_manager and network_manager == 'quantum' -%}
88network_api_class = nova.network.quantumv2.api.API
89quantum_url = {{ neutron_url }}
90{% if auth_host -%}
91quantum_auth_strategy = keystone
92quantum_admin_tenant_name = {{ admin_tenant_name }}
93quantum_admin_username = {{ admin_user }}
94quantum_admin_password = {{ admin_password }}
95quantum_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
96{% endif -%}
97{% elif network_manager and network_manager == 'neutron' -%}
98network_api_class = nova.network.neutronv2.api.API
99neutron_url = {{ neutron_url }}
100{% if auth_host -%}
101neutron_auth_strategy = keystone
102neutron_admin_tenant_name = {{ admin_tenant_name }}
103neutron_admin_username = {{ admin_user }}
104neutron_admin_password = {{ admin_password }}
105neutron_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
106{% endif -%}
107{% else -%}
108network_manager = nova.network.manager.FlatDHCPManager
109{% endif -%}
110
111{% if default_floating_pool -%}
112default_floating_pool = {{ default_floating_pool }}
113{% endif -%}
114
115{% if volume_service -%}
116volume_api_class=nova.volume.cinder.API
117{% endif -%}
118
119{% if user_config_flags -%}
120{% for key, value in user_config_flags.iteritems() -%}
121{{ key }} = {{ value }}
122{% endfor -%}
123{% endif -%}
124
125{% if listen_ports -%}
126{% for key, value in listen_ports.iteritems() -%}
127{{ key }} = {{ value }}
128{% endfor -%}
129{% endif -%}
130
131{% if sections and 'DEFAULT' in sections -%}
132{% for key, value in sections['DEFAULT'] -%}
133{{ key }} = {{ value }}
134{% endfor -%}
135{% endif %}
136
137{% include "parts/database-v2" %}
138
139{% if auth_host -%}
140[keystone_authtoken]
141auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/
142auth_host = {{ auth_host }}
143auth_port = {{ auth_port }}
144auth_protocol = {{ auth_protocol }}
145admin_tenant_name = {{ admin_tenant_name }}
146admin_user = {{ admin_user }}
147admin_password = {{ admin_password }}
148{% endif -%}
149
150[osapi_v3]
151enabled=True
152
153{% include "parts/cell" %}
154
155[conductor]
156workers = {{ workers }}
0157
=== modified file 'templates/kilo/nova.conf'
--- templates/kilo/nova.conf 2015-03-31 11:39:19 +0000
+++ templates/kilo/nova.conf 2015-03-31 14:56:40 +0000
@@ -114,6 +114,8 @@
114{% endfor -%}114{% endfor -%}
115{% endif %}115{% endif %}
116116
117{% include "section-zeromq" %}
118
117{% include "parts/database-v2" %}119{% include "parts/database-v2" %}
118120
119{% if glance_api_servers -%}121{% if glance_api_servers -%}
120122
=== added file 'templates/kilo/zeromq'
--- templates/kilo/zeromq 1970-01-01 00:00:00 +0000
+++ templates/kilo/zeromq 2015-03-31 14:56:40 +0000
@@ -0,0 +1,14 @@
1{% if zmq_host -%}
2# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
3rpc_backend = zmq
4rpc_zmq_host = {{ zmq_host }}
5{% if zmq_redis_address -%}
6rpc_zmq_matchmaker = oslo_messaging._drivers.matchmaker_redis.MatchMakerRedis
7matchmaker_heartbeat_freq = 15
8matchmaker_heartbeat_ttl = 30
9[matchmaker_redis]
10host = {{ zmq_redis_address }}
11{% else -%}
12rpc_zmq_matchmaker = oslo_messaging._drivers.matchmaker_ring.MatchMakerRing
13{% endif -%}
14{% endif -%}
015
=== modified file 'tests/charmhelpers/contrib/openstack/amulet/deployment.py'
--- tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 11:39:19 +0000
+++ tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 14:56:40 +0000
@@ -15,6 +15,7 @@
15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.15# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
1616
17import six17import six
18from collections import OrderedDict
18from charmhelpers.contrib.amulet.deployment import (19from charmhelpers.contrib.amulet.deployment import (
19 AmuletDeployment20 AmuletDeployment
20)21)
@@ -100,12 +101,34 @@
100 """101 """
101 (self.precise_essex, self.precise_folsom, self.precise_grizzly,102 (self.precise_essex, self.precise_folsom, self.precise_grizzly,
102 self.precise_havana, self.precise_icehouse,103 self.precise_havana, self.precise_icehouse,
103 self.trusty_icehouse) = range(6)104 self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8)
104 releases = {105 releases = {
105 ('precise', None): self.precise_essex,106 ('precise', None): self.precise_essex,
106 ('precise', 'cloud:precise-folsom'): self.precise_folsom,107 ('precise', 'cloud:precise-folsom'): self.precise_folsom,
107 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,108 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
108 ('precise', 'cloud:precise-havana'): self.precise_havana,109 ('precise', 'cloud:precise-havana'): self.precise_havana,
109 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,110 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
110 ('trusty', None): self.trusty_icehouse}111 ('trusty', None): self.trusty_icehouse,
112 ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
113 ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
111 return releases[(self.series, self.openstack)]114 return releases[(self.series, self.openstack)]
115
116 def _get_openstack_release_string(self):
117 """Get openstack release string.
118
119 Return a string representing the openstack release.
120 """
121 releases = OrderedDict([
122 ('precise', 'essex'),
123 ('quantal', 'folsom'),
124 ('raring', 'grizzly'),
125 ('saucy', 'havana'),
126 ('trusty', 'icehouse'),
127 ('utopic', 'juno'),
128 ('vivid', 'kilo'),
129 ])
130 if self.openstack:
131 os_origin = self.openstack.split(':')[1]
132 return os_origin.split('%s-' % self.series)[1].split('/')[0]
133 else:
134 return releases[self.series]
112135
=== modified file 'unit_tests/test_nova_cc_hooks.py'
--- unit_tests/test_nova_cc_hooks.py 2015-03-31 11:39:19 +0000
+++ unit_tests/test_nova_cc_hooks.py 2015-03-31 14:56:40 +0000
@@ -120,10 +120,12 @@
120 identity_joined, cluster_joined):120 identity_joined, cluster_joined):
121 self.openstack_upgrade_available.return_value = True121 self.openstack_upgrade_available.return_value = True
122 self.relation_ids.return_value = ['generic_rid']122 self.relation_ids.return_value = ['generic_rid']
123 _zmq_joined = self.patch('zeromq_configuration_relation_joined')
123 hooks.config_changed()124 hooks.config_changed()
124 self.assertTrue(self.do_openstack_upgrade.called)125 self.assertTrue(self.do_openstack_upgrade.called)
125 self.assertTrue(neutron_api_joined.called)126 self.assertTrue(neutron_api_joined.called)
126 self.assertTrue(identity_joined.called)127 self.assertTrue(identity_joined.called)
128 self.assertTrue(_zmq_joined.called)
127 self.assertTrue(cluster_joined.called)129 self.assertTrue(cluster_joined.called)
128 self.assertTrue(self.save_script_rc.called)130 self.assertTrue(self.save_script_rc.called)
129131

Subscribers

People subscribed via source and target branches