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
1=== modified file 'hooks/charmhelpers/contrib/openstack/amulet/deployment.py'
2--- hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 11:39:19 +0000
3+++ hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 14:56:40 +0000
4@@ -15,6 +15,7 @@
5 # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
6
7 import six
8+from collections import OrderedDict
9 from charmhelpers.contrib.amulet.deployment import (
10 AmuletDeployment
11 )
12@@ -100,12 +101,34 @@
13 """
14 (self.precise_essex, self.precise_folsom, self.precise_grizzly,
15 self.precise_havana, self.precise_icehouse,
16- self.trusty_icehouse) = range(6)
17+ self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8)
18 releases = {
19 ('precise', None): self.precise_essex,
20 ('precise', 'cloud:precise-folsom'): self.precise_folsom,
21 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
22 ('precise', 'cloud:precise-havana'): self.precise_havana,
23 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
24- ('trusty', None): self.trusty_icehouse}
25+ ('trusty', None): self.trusty_icehouse,
26+ ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
27+ ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
28 return releases[(self.series, self.openstack)]
29+
30+ def _get_openstack_release_string(self):
31+ """Get openstack release string.
32+
33+ Return a string representing the openstack release.
34+ """
35+ releases = OrderedDict([
36+ ('precise', 'essex'),
37+ ('quantal', 'folsom'),
38+ ('raring', 'grizzly'),
39+ ('saucy', 'havana'),
40+ ('trusty', 'icehouse'),
41+ ('utopic', 'juno'),
42+ ('vivid', 'kilo'),
43+ ])
44+ if self.openstack:
45+ os_origin = self.openstack.split(':')[1]
46+ return os_origin.split('%s-' % self.series)[1].split('/')[0]
47+ else:
48+ return releases[self.series]
49
50=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
51--- hooks/charmhelpers/contrib/openstack/context.py 2015-03-31 11:39:19 +0000
52+++ hooks/charmhelpers/contrib/openstack/context.py 2015-03-31 14:56:40 +0000
53@@ -47,6 +47,7 @@
54 )
55
56 from charmhelpers.core.sysctl import create as sysctl_create
57+from charmhelpers.core.strutils import bool_from_string
58
59 from charmhelpers.core.host import (
60 list_nics,
61@@ -67,6 +68,7 @@
62 )
63 from charmhelpers.contrib.openstack.neutron import (
64 neutron_plugin_attribute,
65+ parse_data_port_mappings,
66 )
67 from charmhelpers.contrib.openstack.ip import (
68 resolve_address,
69@@ -82,7 +84,6 @@
70 is_bridge_member,
71 )
72 from charmhelpers.contrib.openstack.utils import get_host_ip
73-
74 CA_CERT_PATH = '/usr/local/share/ca-certificates/keystone_juju_ca_cert.crt'
75 ADDRESS_TYPES = ['admin', 'internal', 'public']
76
77@@ -1162,3 +1163,145 @@
78 sysctl_create(sysctl_dict,
79 '/etc/sysctl.d/50-{0}.conf'.format(charm_name()))
80 return {'sysctl': sysctl_dict}
81+
82+
83+class NeutronAPIContext(OSContextGenerator):
84+ '''
85+ Inspects current neutron-plugin-api relation for neutron settings. Return
86+ defaults if it is not present.
87+ '''
88+ interfaces = ['neutron-plugin-api']
89+
90+ def __call__(self):
91+ self.neutron_defaults = {
92+ 'l2_population': {
93+ 'rel_key': 'l2-population',
94+ 'default': False,
95+ },
96+ 'overlay_network_type': {
97+ 'rel_key': 'overlay-network-type',
98+ 'default': 'gre',
99+ },
100+ 'neutron_security_groups': {
101+ 'rel_key': 'neutron-security-groups',
102+ 'default': False,
103+ },
104+ 'network_device_mtu': {
105+ 'rel_key': 'network-device-mtu',
106+ 'default': None,
107+ },
108+ 'enable_dvr': {
109+ 'rel_key': 'enable-dvr',
110+ 'default': False,
111+ },
112+ 'enable_l3ha': {
113+ 'rel_key': 'enable-l3ha',
114+ 'default': False,
115+ },
116+ }
117+ ctxt = self.get_neutron_options({})
118+ for rid in relation_ids('neutron-plugin-api'):
119+ for unit in related_units(rid):
120+ rdata = relation_get(rid=rid, unit=unit)
121+ if 'l2-population' in rdata:
122+ ctxt.update(self.get_neutron_options(rdata))
123+
124+ return ctxt
125+
126+ def get_neutron_options(self, rdata):
127+ settings = {}
128+ for nkey in self.neutron_defaults.keys():
129+ defv = self.neutron_defaults[nkey]['default']
130+ rkey = self.neutron_defaults[nkey]['rel_key']
131+ if rkey in rdata.keys():
132+ if type(defv) is bool:
133+ settings[nkey] = bool_from_string(rdata[rkey])
134+ else:
135+ settings[nkey] = rdata[rkey]
136+ else:
137+ settings[nkey] = defv
138+ return settings
139+
140+
141+class ExternalPortContext(NeutronPortContext):
142+
143+ def __call__(self):
144+ ctxt = {}
145+ ports = config('ext-port')
146+ if ports:
147+ ports = [p.strip() for p in ports.split()]
148+ ports = self.resolve_ports(ports)
149+ if ports:
150+ ctxt = {"ext_port": ports[0]}
151+ napi_settings = NeutronAPIContext()()
152+ mtu = napi_settings.get('network_device_mtu')
153+ if mtu:
154+ ctxt['ext_port_mtu'] = mtu
155+
156+ return ctxt
157+
158+
159+class DataPortContext(NeutronPortContext):
160+
161+ def __call__(self):
162+ ports = config('data-port')
163+ if ports:
164+ portmap = parse_data_port_mappings(ports)
165+ ports = portmap.values()
166+ resolved = self.resolve_ports(ports)
167+ normalized = {get_nic_hwaddr(port): port for port in resolved
168+ if port not in ports}
169+ normalized.update({port: port for port in resolved
170+ if port in ports})
171+ if resolved:
172+ return {bridge: normalized[port] for bridge, port in
173+ six.iteritems(portmap) if port in normalized.keys()}
174+
175+ return None
176+
177+
178+class PhyNICMTUContext(DataPortContext):
179+
180+ def __call__(self):
181+ ctxt = {}
182+ mappings = super(PhyNICMTUContext, self).__call__()
183+ if mappings and mappings.values():
184+ ports = mappings.values()
185+ napi_settings = NeutronAPIContext()()
186+ mtu = napi_settings.get('network_device_mtu')
187+ if mtu:
188+ ctxt["devs"] = '\\n'.join(ports)
189+ ctxt['mtu'] = mtu
190+
191+ return ctxt
192+
193+
194+class NetworkServiceContext(OSContextGenerator):
195+
196+ def __init__(self, rel_name='quantum-network-service'):
197+ self.rel_name = rel_name
198+ self.interfaces = [rel_name]
199+
200+ def __call__(self):
201+ for rid in relation_ids(self.rel_name):
202+ for unit in related_units(rid):
203+ rdata = relation_get(rid=rid, unit=unit)
204+ ctxt = {
205+ 'keystone_host': rdata.get('keystone_host'),
206+ 'service_port': rdata.get('service_port'),
207+ 'auth_port': rdata.get('auth_port'),
208+ 'service_tenant': rdata.get('service_tenant'),
209+ 'service_username': rdata.get('service_username'),
210+ 'service_password': rdata.get('service_password'),
211+ 'quantum_host': rdata.get('quantum_host'),
212+ 'quantum_port': rdata.get('quantum_port'),
213+ 'quantum_url': rdata.get('quantum_url'),
214+ 'region': rdata.get('region'),
215+ 'service_protocol':
216+ rdata.get('service_protocol') or 'http',
217+ 'auth_protocol':
218+ rdata.get('auth_protocol') or 'http',
219+ }
220+ if context_complete(ctxt):
221+ return ctxt
222+ return {}
223
224=== added file 'hooks/charmhelpers/contrib/openstack/templates/git.upstart'
225--- hooks/charmhelpers/contrib/openstack/templates/git.upstart 1970-01-01 00:00:00 +0000
226+++ hooks/charmhelpers/contrib/openstack/templates/git.upstart 2015-03-31 14:56:40 +0000
227@@ -0,0 +1,13 @@
228+description "{{ service_description }}"
229+author "Juju {{ service_name }} Charm <juju@localhost>"
230+
231+start on runlevel [2345]
232+stop on runlevel [!2345]
233+
234+respawn
235+
236+exec start-stop-daemon --start --chuid {{ user_name }} \
237+ --chdir {{ start_dir }} --name {{ process_name }} \
238+ --exec {{ executable_name }} -- \
239+ --config-file={{ config_file }} \
240+ --log-file={{ log_file }}
241
242=== added file 'hooks/charmhelpers/contrib/openstack/templates/section-zeromq'
243--- hooks/charmhelpers/contrib/openstack/templates/section-zeromq 1970-01-01 00:00:00 +0000
244+++ hooks/charmhelpers/contrib/openstack/templates/section-zeromq 2015-03-31 14:56:40 +0000
245@@ -0,0 +1,14 @@
246+{% if zmq_host -%}
247+# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
248+rpc_backend = zmq
249+rpc_zmq_host = {{ zmq_host }}
250+{% if zmq_redis_address -%}
251+rpc_zmq_matchmaker = redis
252+matchmaker_heartbeat_freq = 15
253+matchmaker_heartbeat_ttl = 30
254+[matchmaker_redis]
255+host = {{ zmq_redis_address }}
256+{% else -%}
257+rpc_zmq_matchmaker = ring
258+{% endif -%}
259+{% endif -%}
260
261=== removed file 'hooks/charmhelpers/contrib/openstack/templates/zeromq'
262--- hooks/charmhelpers/contrib/openstack/templates/zeromq 2015-02-24 12:37:34 +0000
263+++ hooks/charmhelpers/contrib/openstack/templates/zeromq 1970-01-01 00:00:00 +0000
264@@ -1,14 +0,0 @@
265-{% if zmq_host -%}
266-# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
267-rpc_backend = zmq
268-rpc_zmq_host = {{ zmq_host }}
269-{% if zmq_redis_address -%}
270-rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_redis.MatchMakerRedis
271-matchmaker_heartbeat_freq = 15
272-matchmaker_heartbeat_ttl = 30
273-[matchmaker_redis]
274-host = {{ zmq_redis_address }}
275-{% else -%}
276-rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_ring.MatchMakerRing
277-{% endif -%}
278-{% endif -%}
279
280=== modified file 'hooks/charmhelpers/contrib/openstack/utils.py'
281--- hooks/charmhelpers/contrib/openstack/utils.py 2015-03-31 11:39:19 +0000
282+++ hooks/charmhelpers/contrib/openstack/utils.py 2015-03-31 14:56:40 +0000
283@@ -30,6 +30,10 @@
284
285 from charmhelpers.contrib.network import ip
286
287+from charmhelpers.core import (
288+ unitdata,
289+)
290+
291 from charmhelpers.core.hookenv import (
292 config,
293 log as juju_log,
294@@ -330,6 +334,21 @@
295 error_out("Invalid openstack-release specified: %s" % rel)
296
297
298+def config_value_changed(option):
299+ """
300+ Determine if config value changed since last call to this function.
301+ """
302+ hook_data = unitdata.HookData()
303+ with hook_data():
304+ db = unitdata.kv()
305+ current = config(option)
306+ saved = db.get(option)
307+ db.set(option, current)
308+ if saved is None:
309+ return False
310+ return current != saved
311+
312+
313 def save_script_rc(script_path="scripts/scriptrc", **env_vars):
314 """
315 Write an rc file in the charm-delivered directory containing
316@@ -469,82 +488,95 @@
317
318
319 def git_install_requested():
320- """Returns true if openstack-origin-git is specified."""
321- return config('openstack-origin-git') != "None"
322+ """
323+ Returns true if openstack-origin-git is specified.
324+ """
325+ return config('openstack-origin-git') is not None
326
327
328 requirements_dir = None
329
330
331-def git_clone_and_install(file_name, core_project):
332- """Clone/install all OpenStack repos specified in yaml config file."""
333+def git_clone_and_install(projects_yaml, core_project):
334+ """
335+ Clone/install all specified OpenStack repositories.
336+
337+ The expected format of projects_yaml is:
338+ repositories:
339+ - {name: keystone,
340+ repository: 'git://git.openstack.org/openstack/keystone.git',
341+ branch: 'stable/icehouse'}
342+ - {name: requirements,
343+ repository: 'git://git.openstack.org/openstack/requirements.git',
344+ branch: 'stable/icehouse'}
345+ directory: /mnt/openstack-git
346+
347+ The directory key is optional.
348+ """
349 global requirements_dir
350+ parent_dir = '/mnt/openstack-git'
351
352- if file_name == "None":
353+ if not projects_yaml:
354 return
355
356- yaml_file = os.path.join(charm_dir(), file_name)
357-
358- # clone/install the requirements project first
359- installed = _git_clone_and_install_subset(yaml_file,
360- whitelist=['requirements'])
361- if 'requirements' not in installed:
362- error_out('requirements git repository must be specified')
363-
364- # clone/install all other projects except requirements and the core project
365- blacklist = ['requirements', core_project]
366- _git_clone_and_install_subset(yaml_file, blacklist=blacklist,
367- update_requirements=True)
368-
369- # clone/install the core project
370- whitelist = [core_project]
371- installed = _git_clone_and_install_subset(yaml_file, whitelist=whitelist,
372- update_requirements=True)
373- if core_project not in installed:
374- error_out('{} git repository must be specified'.format(core_project))
375-
376-
377-def _git_clone_and_install_subset(yaml_file, whitelist=[], blacklist=[],
378- update_requirements=False):
379- """Clone/install subset of OpenStack repos specified in yaml config file."""
380- global requirements_dir
381- installed = []
382-
383- with open(yaml_file, 'r') as fd:
384- projects = yaml.load(fd)
385- for proj, val in projects.items():
386- # The project subset is chosen based on the following 3 rules:
387- # 1) If project is in blacklist, we don't clone/install it, period.
388- # 2) If whitelist is empty, we clone/install everything else.
389- # 3) If whitelist is not empty, we clone/install everything in the
390- # whitelist.
391- if proj in blacklist:
392- continue
393- if whitelist and proj not in whitelist:
394- continue
395- repo = val['repository']
396- branch = val['branch']
397- repo_dir = _git_clone_and_install_single(repo, branch,
398- update_requirements)
399- if proj == 'requirements':
400- requirements_dir = repo_dir
401- installed.append(proj)
402- return installed
403-
404-
405-def _git_clone_and_install_single(repo, branch, update_requirements=False):
406- """Clone and install a single git repository."""
407- dest_parent_dir = "/mnt/openstack-git/"
408- dest_dir = os.path.join(dest_parent_dir, os.path.basename(repo))
409-
410- if not os.path.exists(dest_parent_dir):
411- juju_log('Host dir not mounted at {}. '
412- 'Creating directory there instead.'.format(dest_parent_dir))
413- os.mkdir(dest_parent_dir)
414+ projects = yaml.load(projects_yaml)
415+ _git_validate_projects_yaml(projects, core_project)
416+
417+ if 'directory' in projects.keys():
418+ parent_dir = projects['directory']
419+
420+ for p in projects['repositories']:
421+ repo = p['repository']
422+ branch = p['branch']
423+ if p['name'] == 'requirements':
424+ repo_dir = _git_clone_and_install_single(repo, branch, parent_dir,
425+ update_requirements=False)
426+ requirements_dir = repo_dir
427+ else:
428+ repo_dir = _git_clone_and_install_single(repo, branch, parent_dir,
429+ update_requirements=True)
430+
431+
432+def _git_validate_projects_yaml(projects, core_project):
433+ """
434+ Validate the projects yaml.
435+ """
436+ _git_ensure_key_exists('repositories', projects)
437+
438+ for project in projects['repositories']:
439+ _git_ensure_key_exists('name', project.keys())
440+ _git_ensure_key_exists('repository', project.keys())
441+ _git_ensure_key_exists('branch', project.keys())
442+
443+ if projects['repositories'][0]['name'] != 'requirements':
444+ error_out('{} git repo must be specified first'.format('requirements'))
445+
446+ if projects['repositories'][-1]['name'] != core_project:
447+ error_out('{} git repo must be specified last'.format(core_project))
448+
449+
450+def _git_ensure_key_exists(key, keys):
451+ """
452+ Ensure that key exists in keys.
453+ """
454+ if key not in keys:
455+ error_out('openstack-origin-git key \'{}\' is missing'.format(key))
456+
457+
458+def _git_clone_and_install_single(repo, branch, parent_dir, update_requirements):
459+ """
460+ Clone and install a single git repository.
461+ """
462+ dest_dir = os.path.join(parent_dir, os.path.basename(repo))
463+
464+ if not os.path.exists(parent_dir):
465+ juju_log('Directory already exists at {}. '
466+ 'No need to create directory.'.format(parent_dir))
467+ os.mkdir(parent_dir)
468
469 if not os.path.exists(dest_dir):
470 juju_log('Cloning git repo: {}, branch: {}'.format(repo, branch))
471- repo_dir = install_remote(repo, dest=dest_parent_dir, branch=branch)
472+ repo_dir = install_remote(repo, dest=parent_dir, branch=branch)
473 else:
474 repo_dir = dest_dir
475
476@@ -561,16 +593,39 @@
477
478
479 def _git_update_requirements(package_dir, reqs_dir):
480- """Update from global requirements.
481+ """
482+ Update from global requirements.
483
484- Update an OpenStack git directory's requirements.txt and
485- test-requirements.txt from global-requirements.txt."""
486+ Update an OpenStack git directory's requirements.txt and
487+ test-requirements.txt from global-requirements.txt.
488+ """
489 orig_dir = os.getcwd()
490 os.chdir(reqs_dir)
491- cmd = "python update.py {}".format(package_dir)
492+ cmd = ['python', 'update.py', package_dir]
493 try:
494- subprocess.check_call(cmd.split(' '))
495+ subprocess.check_call(cmd)
496 except subprocess.CalledProcessError:
497 package = os.path.basename(package_dir)
498 error_out("Error updating {} from global-requirements.txt".format(package))
499 os.chdir(orig_dir)
500+
501+
502+def git_src_dir(projects_yaml, project):
503+ """
504+ Return the directory where the specified project's source is located.
505+ """
506+ parent_dir = '/mnt/openstack-git'
507+
508+ if not projects_yaml:
509+ return
510+
511+ projects = yaml.load(projects_yaml)
512+
513+ if 'directory' in projects.keys():
514+ parent_dir = projects['directory']
515+
516+ for p in projects['repositories']:
517+ if p['name'] == project:
518+ return os.path.join(parent_dir, os.path.basename(p['repository']))
519+
520+ return None
521
522=== modified file 'hooks/charmhelpers/core/unitdata.py'
523--- hooks/charmhelpers/core/unitdata.py 2015-02-19 04:28:27 +0000
524+++ hooks/charmhelpers/core/unitdata.py 2015-03-31 14:56:40 +0000
525@@ -443,7 +443,7 @@
526 data = hookenv.execution_environment()
527 self.conf = conf_delta = self.kv.delta(data['conf'], 'config')
528 self.rels = rels_delta = self.kv.delta(data['rels'], 'rels')
529- self.kv.set('env', data['env'])
530+ self.kv.set('env', dict(data['env']))
531 self.kv.set('unit', data['unit'])
532 self.kv.set('relid', data.get('relid'))
533 return conf_delta, rels_delta
534
535=== modified file 'hooks/nova_cc_hooks.py'
536--- hooks/nova_cc_hooks.py 2015-03-31 11:39:19 +0000
537+++ hooks/nova_cc_hooks.py 2015-03-31 14:56:40 +0000
538@@ -46,6 +46,7 @@
539 configure_installation_source,
540 openstack_upgrade_available,
541 os_release,
542+ os_requires_version,
543 sync_db_with_multi_ipv6_addresses
544 )
545
546@@ -79,6 +80,7 @@
547 migrate_nova_database,
548 neutron_plugin,
549 save_script_rc,
550+ services,
551 ssh_compute_add,
552 ssh_compute_remove,
553 ssh_known_hosts_lines,
554@@ -94,8 +96,8 @@
555 console_attributes,
556 service_guard,
557 guard_map,
558- services,
559- setup_ipv6
560+ get_topics,
561+ setup_ipv6,
562 )
563
564 from charmhelpers.contrib.hahelpers.cluster import (
565@@ -172,6 +174,8 @@
566 for rid in relation_ids('cloud-compute')]
567 for r_id in relation_ids('identity-service'):
568 identity_joined(rid=r_id)
569+ for rid in relation_ids('zeromq-configuration'):
570+ zeromq_configuration_relation_joined(rid)
571 [cluster_joined(rid) for rid in relation_ids('cluster')]
572 update_nrpe_config()
573
574@@ -866,6 +870,14 @@
575 quantum_joined(rid=rid)
576
577
578+@hooks.hook('zeromq-configuration-relation-joined')
579+@os_requires_version('kilo', 'nova-common')
580+def zeromq_configuration_relation_joined(relid=None):
581+ relation_set(relation_id=relid,
582+ topics=" ".join(get_topics()),
583+ users="nova")
584+
585+
586 @hooks.hook('nrpe-external-master-relation-joined',
587 'nrpe-external-master-relation-changed')
588 def update_nrpe_config():
589@@ -889,6 +901,12 @@
590 CONFIGS.write(NOVA_CONF)
591
592
593+@hooks.hook('zeromq-configuration-relation-changed')
594+@restart_on_change(restart_map(), stopstart=True)
595+def zeromq_configuration_relation_changed():
596+ CONFIGS.write(NOVA_CONF)
597+
598+
599 def main():
600 try:
601 hooks.execute(sys.argv)
602
603=== modified file 'hooks/nova_cc_utils.py'
604--- hooks/nova_cc_utils.py 2015-03-31 11:39:19 +0000
605+++ hooks/nova_cc_utils.py 2015-03-31 14:56:40 +0000
606@@ -128,6 +128,8 @@
607 service='nova',
608 service_user='nova'),
609 nova_cc_context.VolumeServiceContext(),
610+ context.ZeroMQContext(),
611+ context.NotificationDriverContext(),
612 nova_cc_context.NovaIPv6Context(),
613 nova_cc_context.NeutronCCContext(),
614 nova_cc_context.NovaConfigContext(),
615@@ -928,6 +930,13 @@
616 return wrap
617
618
619+def get_topics():
620+ topics = ['scheduler', 'conductor']
621+ if 'nova-consoleauth' in services():
622+ topics.append('consoleauth')
623+ return topics
624+
625+
626 def cmd_all_services(cmd):
627 if cmd == 'start':
628 for svc in services():
629
630=== added symlink 'hooks/zeromq-configuration-relation-changed'
631=== target is u'nova_cc_hooks.py'
632=== added symlink 'hooks/zeromq-configuration-relation-joined'
633=== target is u'nova_cc_hooks.py'
634=== modified file 'metadata.yaml'
635--- metadata.yaml 2015-01-09 15:47:07 +0000
636+++ metadata.yaml 2015-03-31 14:56:40 +0000
637@@ -45,6 +45,9 @@
638 scope: container
639 memcache:
640 interface: memcache
641+ zeromq-configuration:
642+ interface: zeromq-configuration
643+ scope: container
644 peers:
645 cluster:
646 interface: nova-ha
647
648=== modified file 'templates/icehouse/neutron.conf'
649--- templates/icehouse/neutron.conf 2015-02-20 10:21:52 +0000
650+++ templates/icehouse/neutron.conf 2015-03-31 14:56:40 +0000
651@@ -7,7 +7,9 @@
652 lock_path = $state_path/lock
653 bind_host = {{ bind_host }}
654 auth_strategy = keystone
655+{% if notifications == 'True' -%}
656 notification_driver = neutron.openstack.common.notifier.rpc_notifier
657+{% endif -%}
658 api_workers = {{ workers }}
659 use_syslog = {{ use_syslog }}
660
661
662=== added directory 'templates/juno'
663=== added file 'templates/juno/nova.conf'
664--- templates/juno/nova.conf 1970-01-01 00:00:00 +0000
665+++ templates/juno/nova.conf 2015-03-31 14:56:40 +0000
666@@ -0,0 +1,156 @@
667+# juno
668+###############################################################################
669+# [ WARNING ]
670+# Configuration file maintained by Juju. Local changes may be overwritten.
671+###############################################################################
672+[DEFAULT]
673+verbose={{ verbose }}
674+debug={{ debug }}
675+dhcpbridge_flagfile=/etc/nova/nova.conf
676+dhcpbridge=/usr/bin/nova-dhcpbridge
677+logdir=/var/log/nova
678+state_path=/var/lib/nova
679+lock_path=/var/lock/nova
680+force_dhcp_release=True
681+iscsi_helper=tgtadm
682+libvirt_use_virtio_for_bridges=True
683+connection_type=libvirt
684+root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
685+ec2_private_dns_show_ip=True
686+api_paste_config=/etc/nova/api-paste.ini
687+volumes_path=/var/lib/nova/volumes
688+enabled_apis=ec2,osapi_compute,metadata
689+auth_strategy=keystone
690+compute_driver=libvirt.LibvirtDriver
691+use_ipv6 = {{ use_ipv6 }}
692+osapi_compute_listen = {{ bind_host }}
693+metadata_host = {{ bind_host }}
694+s3_listen = {{ bind_host }}
695+ec2_listen = {{ bind_host }}
696+
697+osapi_compute_workers = {{ workers }}
698+ec2_workers = {{ workers }}
699+
700+scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,CoreFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
701+cpu_allocation_ratio = {{ cpu_allocation_ratio }}
702+ram_allocation_ratio = {{ ram_allocation_ratio }}
703+
704+use_syslog={{ use_syslog }}
705+my_ip = {{ host_ip }}
706+
707+{% if memcached_servers %}
708+memcached_servers = {{ memcached_servers }}
709+{% endif %}
710+
711+{% if keystone_ec2_url -%}
712+keystone_ec2_url = {{ keystone_ec2_url }}
713+{% endif -%}
714+
715+{% include "parts/rabbitmq" %}
716+
717+{% if glance_api_servers -%}
718+glance_api_servers = {{ glance_api_servers }}
719+{% endif -%}
720+
721+{% if rbd_pool -%}
722+rbd_pool = {{ rbd_pool }}
723+rbd_user = {{ rbd_user }}
724+rbd_secret_uuid = {{ rbd_secret_uuid }}
725+{% endif -%}
726+
727+{% if neutron_plugin and neutron_plugin == 'ovs' -%}
728+libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
729+libvirt_user_virtio_for_bridges = True
730+{% if neutron_security_groups -%}
731+security_group_api = {{ network_manager }}
732+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
733+{% endif -%}
734+{% if external_network -%}
735+default_floating_pool = {{ external_network }}
736+{% endif -%}
737+{% endif -%}
738+
739+{% if neutron_plugin and neutron_plugin == 'nvp' -%}
740+security_group_api = neutron
741+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
742+{% if external_network -%}
743+default_floating_pool = {{ external_network }}
744+{% endif -%}
745+{% endif -%}
746+
747+{% if network_manager_config -%}
748+{% for key, value in network_manager_config.iteritems() -%}
749+{{ key }} = {{ value }}
750+{% endfor -%}
751+{% endif -%}
752+
753+{% if network_manager and network_manager == 'quantum' -%}
754+network_api_class = nova.network.quantumv2.api.API
755+quantum_url = {{ neutron_url }}
756+{% if auth_host -%}
757+quantum_auth_strategy = keystone
758+quantum_admin_tenant_name = {{ admin_tenant_name }}
759+quantum_admin_username = {{ admin_user }}
760+quantum_admin_password = {{ admin_password }}
761+quantum_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
762+{% endif -%}
763+{% elif network_manager and network_manager == 'neutron' -%}
764+network_api_class = nova.network.neutronv2.api.API
765+neutron_url = {{ neutron_url }}
766+{% if auth_host -%}
767+neutron_auth_strategy = keystone
768+neutron_admin_tenant_name = {{ admin_tenant_name }}
769+neutron_admin_username = {{ admin_user }}
770+neutron_admin_password = {{ admin_password }}
771+neutron_admin_auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}/v2.0
772+{% endif -%}
773+{% else -%}
774+network_manager = nova.network.manager.FlatDHCPManager
775+{% endif -%}
776+
777+{% if default_floating_pool -%}
778+default_floating_pool = {{ default_floating_pool }}
779+{% endif -%}
780+
781+{% if volume_service -%}
782+volume_api_class=nova.volume.cinder.API
783+{% endif -%}
784+
785+{% if user_config_flags -%}
786+{% for key, value in user_config_flags.iteritems() -%}
787+{{ key }} = {{ value }}
788+{% endfor -%}
789+{% endif -%}
790+
791+{% if listen_ports -%}
792+{% for key, value in listen_ports.iteritems() -%}
793+{{ key }} = {{ value }}
794+{% endfor -%}
795+{% endif -%}
796+
797+{% if sections and 'DEFAULT' in sections -%}
798+{% for key, value in sections['DEFAULT'] -%}
799+{{ key }} = {{ value }}
800+{% endfor -%}
801+{% endif %}
802+
803+{% include "parts/database-v2" %}
804+
805+{% if auth_host -%}
806+[keystone_authtoken]
807+auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/
808+auth_host = {{ auth_host }}
809+auth_port = {{ auth_port }}
810+auth_protocol = {{ auth_protocol }}
811+admin_tenant_name = {{ admin_tenant_name }}
812+admin_user = {{ admin_user }}
813+admin_password = {{ admin_password }}
814+{% endif -%}
815+
816+[osapi_v3]
817+enabled=True
818+
819+{% include "parts/cell" %}
820+
821+[conductor]
822+workers = {{ workers }}
823
824=== modified file 'templates/kilo/nova.conf'
825--- templates/kilo/nova.conf 2015-03-31 11:39:19 +0000
826+++ templates/kilo/nova.conf 2015-03-31 14:56:40 +0000
827@@ -114,6 +114,8 @@
828 {% endfor -%}
829 {% endif %}
830
831+{% include "section-zeromq" %}
832+
833 {% include "parts/database-v2" %}
834
835 {% if glance_api_servers -%}
836
837=== added file 'templates/kilo/zeromq'
838--- templates/kilo/zeromq 1970-01-01 00:00:00 +0000
839+++ templates/kilo/zeromq 2015-03-31 14:56:40 +0000
840@@ -0,0 +1,14 @@
841+{% if zmq_host -%}
842+# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
843+rpc_backend = zmq
844+rpc_zmq_host = {{ zmq_host }}
845+{% if zmq_redis_address -%}
846+rpc_zmq_matchmaker = oslo_messaging._drivers.matchmaker_redis.MatchMakerRedis
847+matchmaker_heartbeat_freq = 15
848+matchmaker_heartbeat_ttl = 30
849+[matchmaker_redis]
850+host = {{ zmq_redis_address }}
851+{% else -%}
852+rpc_zmq_matchmaker = oslo_messaging._drivers.matchmaker_ring.MatchMakerRing
853+{% endif -%}
854+{% endif -%}
855
856=== modified file 'tests/charmhelpers/contrib/openstack/amulet/deployment.py'
857--- tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 11:39:19 +0000
858+++ tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 14:56:40 +0000
859@@ -15,6 +15,7 @@
860 # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
861
862 import six
863+from collections import OrderedDict
864 from charmhelpers.contrib.amulet.deployment import (
865 AmuletDeployment
866 )
867@@ -100,12 +101,34 @@
868 """
869 (self.precise_essex, self.precise_folsom, self.precise_grizzly,
870 self.precise_havana, self.precise_icehouse,
871- self.trusty_icehouse) = range(6)
872+ self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8)
873 releases = {
874 ('precise', None): self.precise_essex,
875 ('precise', 'cloud:precise-folsom'): self.precise_folsom,
876 ('precise', 'cloud:precise-grizzly'): self.precise_grizzly,
877 ('precise', 'cloud:precise-havana'): self.precise_havana,
878 ('precise', 'cloud:precise-icehouse'): self.precise_icehouse,
879- ('trusty', None): self.trusty_icehouse}
880+ ('trusty', None): self.trusty_icehouse,
881+ ('trusty', 'cloud:trusty-juno'): self.trusty_juno,
882+ ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo}
883 return releases[(self.series, self.openstack)]
884+
885+ def _get_openstack_release_string(self):
886+ """Get openstack release string.
887+
888+ Return a string representing the openstack release.
889+ """
890+ releases = OrderedDict([
891+ ('precise', 'essex'),
892+ ('quantal', 'folsom'),
893+ ('raring', 'grizzly'),
894+ ('saucy', 'havana'),
895+ ('trusty', 'icehouse'),
896+ ('utopic', 'juno'),
897+ ('vivid', 'kilo'),
898+ ])
899+ if self.openstack:
900+ os_origin = self.openstack.split(':')[1]
901+ return os_origin.split('%s-' % self.series)[1].split('/')[0]
902+ else:
903+ return releases[self.series]
904
905=== modified file 'unit_tests/test_nova_cc_hooks.py'
906--- unit_tests/test_nova_cc_hooks.py 2015-03-31 11:39:19 +0000
907+++ unit_tests/test_nova_cc_hooks.py 2015-03-31 14:56:40 +0000
908@@ -120,10 +120,12 @@
909 identity_joined, cluster_joined):
910 self.openstack_upgrade_available.return_value = True
911 self.relation_ids.return_value = ['generic_rid']
912+ _zmq_joined = self.patch('zeromq_configuration_relation_joined')
913 hooks.config_changed()
914 self.assertTrue(self.do_openstack_upgrade.called)
915 self.assertTrue(neutron_api_joined.called)
916 self.assertTrue(identity_joined.called)
917+ self.assertTrue(_zmq_joined.called)
918 self.assertTrue(cluster_joined.called)
919 self.assertTrue(self.save_script_rc.called)
920

Subscribers

People subscribed via source and target branches