Merge lp:~openstack-charmers/charms/trusty/nova-compute/0mq into lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
- Trusty Tahr (14.04)
- 0mq
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 117 |
Proposed branch: | lp:~openstack-charmers/charms/trusty/nova-compute/0mq |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/nova-compute/next |
Diff against target: |
733 lines (+381/-92) 13 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_compute_hooks.py (+18/-0) hooks/nova_compute_utils.py (+6/-0) metadata.yaml (+3/-3) templates/kilo/nova.conf (+2/-0) tests/charmhelpers/contrib/openstack/amulet/deployment.py (+25/-2) unit_tests/test_nova_compute_hooks.py (+6/-0) |
To merge this branch: | bzr merge lp:~openstack-charmers/charms/trusty/nova-compute/0mq |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Liam Young (community) | Approve | ||
Ryan Beisner (community) | Needs Fixing | ||
James Page | Needs Fixing | ||
Review via email: mp+238879@code.launchpad.net |
Commit message
Description of the change
Ryan Beisner (1chb1n) wrote : | # |
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.
#501 nova-compute-next for gnuoy mp238879
charm_unit_test
This build:
http://
MP URL:
https:/
Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-compute/0mq
Results summary:
UNIT FAIL: unit-test failed
UNIT Results (max last 25 lines) from
/var/lib/
get_
File "hooks/
res = func(*args, **kwargs)
File "hooks/
config_data = json.loads(
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 2] No such file or directory
Name Stmts Miss Cover Missing
-------
nova_compute_
nova_compute_hooks 141 15 89% 81, 99-100, 128, 194, 252, 257-258, 264, 270, 278, 282-285
nova_compute_utils 230 111 52% 163-219, 227, 232-235, 270-272, 279, 283-286, 294-302, 306, 315-324, 337-356, 382-383, 387-388, 407-428, 445-455, 469-470, 474, 479-480
-------
TOTAL 575 196 66%
-------
Ran 56 tests in 7.145s
FAILED (SKIP=5, errors=3)
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://
- 92. By Liam Young
-
Fix unit tests and lint
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.
#703 nova-compute-next for gnuoy mp238879
charm_lint_check
This build:
http://
MP URL:
https:/
Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-compute/0mq
Results summary:
LINT OK: believed to pass, but you should confirm results
LINT Results (max last 25 lines) from
/var/lib/
W: no README file
I: relation neutron-plugin has no hooks
I: missing recommended hook start
I: missing recommended hook stop
I: config.yaml: option os-data-network has no default value
I: config.yaml: option config-flags has no default value
I: config.yaml: option instances-path has no default value
W: config.yaml: option disable-
I: config.yaml: option migration-auth-type 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://
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.
#509 nova-compute-next for gnuoy mp238879
charm_unit_test
This build:
http://
MP URL:
https:/
Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-compute/0mq
Results summary:
UNIT OK: believed to pass, but you should confirm results
UNIT Results (max last 25 lines) from
/var/lib/
Starting unit tests...
......S.
Name Stmts Miss Cover Missing
-------
nova_compute_
nova_compute_hooks 141 15 89% 81, 99-100, 128, 194, 252, 257-258, 264, 270, 278, 282-285
nova_compute_utils 230 111 52% 163-219, 227, 232-235, 270-272, 279, 283-286, 294-302, 306, 315-324, 337-356, 382-383, 387-388, 407-428, 445-455, 469-470, 474, 479-480
-------
TOTAL 575 196 66%
-------
Ran 56 tests in 2.899s
OK (SKIP=5)
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://
James Page (james-page) : | # |
- 93. By Liam Young
-
Remove superfluous stopstart=True from 0mq config restart_on_change decorator
Liam Young (gnuoy) wrote : | # |
Removed superfluous stopstart=True from 0mq config restart_on_change decorator as James suggested in inline comment
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
charm_lint_check #736 nova-compute-next for gnuoy mp238879
LINT OK: believed to pass, but you should confirm results
LINT Results (max last 4 lines) from
/var/lib/
I: config.yaml: option config-flags has no default value
I: config.yaml: option instances-path has no default value
W: config.yaml: option disable-
I: config.yaml: option migration-auth-type has no default value
Full lint output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
charm_unit_test #544 nova-compute-next for gnuoy mp238879
UNIT OK: believed to pass, but you should confirm results
UNIT Results (max last 4 lines) from
/var/lib/
-------
Ran 56 tests in 2.752s
OK (SKIP=5)
Full unit output: http://
Build: http://
Ryan Beisner (1chb1n) wrote : | # |
UOSCI bot says:
charm_amulet_test #289 nova-compute-next for gnuoy mp238879
AMULET OK: believed to pass, but you should confirm results
AMULET Results (max last 4 lines) from
/var/lib/
juju-test.conductor DEBUG : Tearing down osci-sv04 juju environment
juju-test.conductor DEBUG : Calling "juju destroy-environment -y osci-sv04"
WARNING cannot delete security group "juju-osci-sv04-0". Used by another environment?
juju-test INFO : Results: 3 passed, 0 failed, 0 errored
Full amulet output: http://
Build: http://
- 94. By James Page
-
Rebase on next
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #165 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #199 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #179 nova-compute-next for gnuoy mp238879
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://
Build: http://
- 95. By James Page
-
Rebase on next
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #709 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #738 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #894 nova-compute-next for gnuoy mp238879
AMULET OK: passed
Ryan Beisner (1chb1n) wrote : | # |
T-J & U-J deploy tests fail with:
http://
2015-01-13 11:41:57 [DEBUG] deployer.import: Waiting for units before adding relations
2015-01-13 11:42:01 [DEBUG] deployer.env: Delta unit: glance/0 change:error
2015-01-13 11:42:01 [ERROR] deployer.env: The following units had errors:
unit: glance/0: machine: 6 agent-state: error details: hook failed: "install"
2015-01-13 11:42:01 [INFO] deployer.cli: Deployment stopped. run time: 310.34
2015-01-13 11:41:56 INFO juju.worker.uniter uniter.go:480 running "install" hook
2015-01-13 11:41:56 INFO worker.uniter.jujuc server.go:102 running hook tool "juju-log" ["Installing python-netifaces with options: ['--option=
2015-01-13 11:41:56 DEBUG worker.uniter.jujuc server.go:103 hook context id "glance/
2015-01-13 11:41:56 INFO juju-log Installing python-netifaces with options: ['--option=
2015-01-13 11:41:56 INFO install Reading package lists...
2015-01-13 11:41:56 INFO install Building dependency tree...
2015-01-13 11:41:56 INFO install Reading state information...
2015-01-13 11:41:57 INFO install The following NEW packages will be installed:
2015-01-13 11:41:57 INFO install python-netifaces
2015-01-13 11:41:57 INFO install 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2015-01-13 11:41:57 INFO install Need to get 16.7 kB of archives.
2015-01-13 11:41:57 INFO install After this operation, 77.8 kB of additional disk space will be used.
2015-01-13 11:41:57 INFO install WARNING: The following packages cannot be authenticated!
2015-01-13 11:41:57 INFO install python-netifaces
2015-01-13 11:41:57 INFO install E: There are problems and -y was used without --force-yes
2015-01-13 11:41:57 INFO install Traceback (most recent call last):
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 INFO install from glance_utils import (
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 INFO install import glance_contexts
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 INFO install from charmhelpers.
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 INFO install from charmhelpers.
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 INFO install from charmhelpers.
2015-01-13 11:41:57 INFO install File "/var/lib/
2015-01-13 11:41:57 I...
- 96. By James Page
-
Resync 0mq helpers, use centralized template
- 97. By James Page
-
Drop parts from zeromq snippet use
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #841 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #870 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #1065 nova-compute-next for gnuoy mp238879
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://
Build: http://
- 98. By James Page
-
Resync helper
- 99. By James Page
-
Resync helper
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #869 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #898 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #1093 nova-compute-next for gnuoy mp238879
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://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #875 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #904 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #1099 nova-compute-next for gnuoy mp238879
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://
Build: http://
Ryan Beisner (1chb1n) wrote : | # |
FYI, icehouse deploy tests fail with:
(juno passes)
13:06:05 2015-01-20 13:06:05 [ERROR] deployer.env: The following units had errors:
13:06:05 unit: nova-compute/1: machine: 15 agent-state: error details: hook failed: "config-changed"
2015-01-20 13:06:02 INFO juju-log Rendering from template: nova.conf
2015-01-20 13:06:02 INFO config-changed Traceback (most recent call last):
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed main()
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed hooks.execute(
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed self._hooks[
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed f(*args)
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed CONFIGS.write_all()
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed [self.write(k) for k in six.iterkeys(
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed _out = self.render(
2015-01-20 13:06:02 INFO config-changed File "/var/lib/
2015-01-20 13:06:02 INFO config-changed return template.
2015-01-20 13:06:02 INFO config-changed File "/usr/lib/
2015-01-20 13:06:02 INFO config-changed return self.environmen
2015-01-20 13:06:02 INFO config-changed File "/usr/lib/
2015-01-20 13:06:02 INFO config-changed reraise(exc_type, exc_value, tb)
2015-01-20 13:06:02 INFO config-changed File "templates/
2015-01-20 13:06:02 INFO config-changed {% include "parts/zeromq" %}
2015-01-20 13:06:02 INFO config-changed jinja2.
2015-01-20 13:06:02 ERROR juju.worker.uniter uniter.go:486 hook failed: exit status 1
- 100. By James Page
-
Rebase
- 101. By James Page
-
Drop icehouse specific config files - juno upwards only
- 102. By James Page
-
Add zeromq snippet for kilo
- 103. By James Page
-
Switch to trunk of charm-helpers
- 104. By James Page
-
Specialized zeromq snippet for kilo
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2213 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #2002 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #2159 nova-compute-next for gnuoy mp238879
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://
Build: http://
- 105. By James Page
-
Fixup pydev
- 106. By James Page
-
Rebase
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2683 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #2474 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #2512 nova-compute-next for gnuoy mp238879
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://
Build: http://
- 107. By James Page
-
Make 0mq support >= kilo
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #2693 nova-compute-next for gnuoy mp238879
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #2484 nova-compute-next for gnuoy mp238879
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #2522 nova-compute-next for gnuoy mp238879
AMULET OK: passed
Build: http://
- 108. By James Page
-
Rebase, resync
Preview Diff
1 | === modified file 'hooks/charmhelpers/contrib/openstack/amulet/deployment.py' |
2 | --- hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 11:43:21 +0000 |
3 | +++ hooks/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 15:02:03 +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:43:21 +0000 |
52 | +++ hooks/charmhelpers/contrib/openstack/context.py 2015-03-31 15:02:03 +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 15:02:03 +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 15:02:03 +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-03-03 02:32:43 +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:43:21 +0000 |
282 | +++ hooks/charmhelpers/contrib/openstack/utils.py 2015-03-31 15:02:03 +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:35:23 +0000 |
524 | +++ hooks/charmhelpers/core/unitdata.py 2015-03-31 15:02:03 +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_compute_hooks.py' |
536 | --- hooks/nova_compute_hooks.py 2015-03-31 11:43:21 +0000 |
537 | +++ hooks/nova_compute_hooks.py 2015-03-31 15:02:03 +0000 |
538 | @@ -30,6 +30,7 @@ |
539 | from charmhelpers.contrib.openstack.utils import ( |
540 | configure_installation_source, |
541 | openstack_upgrade_available, |
542 | + os_requires_version, |
543 | ) |
544 | |
545 | from charmhelpers.contrib.storage.linux.ceph import ( |
546 | @@ -57,6 +58,7 @@ |
547 | ceph_config_file, CEPH_SECRET, |
548 | enable_shell, disable_shell, |
549 | fix_path_ownership, |
550 | + get_topics, |
551 | assert_charm_supports_ipv6, |
552 | manage_ovs, |
553 | ) |
554 | @@ -118,6 +120,8 @@ |
555 | fix_path_ownership(fp, user='nova') |
556 | |
557 | [compute_joined(rid) for rid in relation_ids('cloud-compute')] |
558 | + for rid in relation_ids('zeromq-configuration'): |
559 | + zeromq_configuration_relation_joined(rid) |
560 | |
561 | update_nrpe_config() |
562 | |
563 | @@ -316,6 +320,20 @@ |
564 | CONFIGS.write_all() |
565 | |
566 | |
567 | +@hooks.hook('zeromq-configuration-relation-joined') |
568 | +@os_requires_version('kilo', 'nova-common') |
569 | +def zeromq_configuration_relation_joined(relid=None): |
570 | + relation_set(relation_id=relid, |
571 | + topics=" ".join(get_topics()), |
572 | + users="nova") |
573 | + |
574 | + |
575 | +@hooks.hook('zeromq-configuration-relation-changed') |
576 | +@restart_on_change(restart_map()) |
577 | +def zeromq_configuration_relation_changed(): |
578 | + CONFIGS.write(NOVA_CONF) |
579 | + |
580 | + |
581 | @hooks.hook('nrpe-external-master-relation-joined', |
582 | 'nrpe-external-master-relation-changed') |
583 | def update_nrpe_config(): |
584 | |
585 | === modified file 'hooks/nova_compute_utils.py' |
586 | --- hooks/nova_compute_utils.py 2015-03-31 13:22:53 +0000 |
587 | +++ hooks/nova_compute_utils.py 2015-03-31 15:02:03 +0000 |
588 | @@ -101,6 +101,8 @@ |
589 | service='nova', |
590 | config_file=NOVA_CONF), |
591 | InstanceConsoleContext(), |
592 | + context.ZeroMQContext(), |
593 | + context.NotificationDriverContext(), |
594 | MetadataServiceContext(), |
595 | HostIPContext()], |
596 | }, |
597 | @@ -496,6 +498,10 @@ |
598 | check_call(cmd) |
599 | |
600 | |
601 | +def get_topics(): |
602 | + return ['compute'] |
603 | + |
604 | + |
605 | def assert_charm_supports_ipv6(): |
606 | """Check whether we are able to support charms ipv6.""" |
607 | if lsb_release()['DISTRIB_CODENAME'].lower() < "trusty": |
608 | |
609 | === added symlink 'hooks/zeromq-configuration-relation-changed' |
610 | === target is u'nova_compute_hooks.py' |
611 | === added symlink 'hooks/zeromq-configuration-relation-joined' |
612 | === target is u'nova_compute_hooks.py' |
613 | === modified file 'metadata.yaml' |
614 | --- metadata.yaml 2015-01-09 15:40:23 +0000 |
615 | +++ metadata.yaml 2015-03-31 15:02:03 +0000 |
616 | @@ -30,6 +30,6 @@ |
617 | neutron-plugin: |
618 | interface: neutron-plugin |
619 | scope: container |
620 | -peers: |
621 | - compute-peer: |
622 | - interface: nova |
623 | + zeromq-configuration: |
624 | + interface: zeromq-configuration |
625 | + scope: container |
626 | |
627 | === modified file 'templates/kilo/nova.conf' |
628 | --- templates/kilo/nova.conf 2015-03-31 11:43:21 +0000 |
629 | +++ templates/kilo/nova.conf 2015-03-31 15:02:03 +0000 |
630 | @@ -101,6 +101,8 @@ |
631 | {% endfor -%} |
632 | {% endif -%} |
633 | |
634 | +{% include "section-zeromq" %} |
635 | + |
636 | {% if network_manager == 'neutron' and network_manager_config -%} |
637 | [neutron] |
638 | url = {{ network_manager_config.neutron_url }} |
639 | |
640 | === modified file 'tests/charmhelpers/contrib/openstack/amulet/deployment.py' |
641 | --- tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-09 13:21:38 +0000 |
642 | +++ tests/charmhelpers/contrib/openstack/amulet/deployment.py 2015-03-31 15:02:03 +0000 |
643 | @@ -15,6 +15,7 @@ |
644 | # along with charm-helpers. If not, see <http://www.gnu.org/licenses/>. |
645 | |
646 | import six |
647 | +from collections import OrderedDict |
648 | from charmhelpers.contrib.amulet.deployment import ( |
649 | AmuletDeployment |
650 | ) |
651 | @@ -100,12 +101,34 @@ |
652 | """ |
653 | (self.precise_essex, self.precise_folsom, self.precise_grizzly, |
654 | self.precise_havana, self.precise_icehouse, |
655 | - self.trusty_icehouse) = range(6) |
656 | + self.trusty_icehouse, self.trusty_juno, self.trusty_kilo) = range(8) |
657 | releases = { |
658 | ('precise', None): self.precise_essex, |
659 | ('precise', 'cloud:precise-folsom'): self.precise_folsom, |
660 | ('precise', 'cloud:precise-grizzly'): self.precise_grizzly, |
661 | ('precise', 'cloud:precise-havana'): self.precise_havana, |
662 | ('precise', 'cloud:precise-icehouse'): self.precise_icehouse, |
663 | - ('trusty', None): self.trusty_icehouse} |
664 | + ('trusty', None): self.trusty_icehouse, |
665 | + ('trusty', 'cloud:trusty-juno'): self.trusty_juno, |
666 | + ('trusty', 'cloud:trusty-kilo'): self.trusty_kilo} |
667 | return releases[(self.series, self.openstack)] |
668 | + |
669 | + def _get_openstack_release_string(self): |
670 | + """Get openstack release string. |
671 | + |
672 | + Return a string representing the openstack release. |
673 | + """ |
674 | + releases = OrderedDict([ |
675 | + ('precise', 'essex'), |
676 | + ('quantal', 'folsom'), |
677 | + ('raring', 'grizzly'), |
678 | + ('saucy', 'havana'), |
679 | + ('trusty', 'icehouse'), |
680 | + ('utopic', 'juno'), |
681 | + ('vivid', 'kilo'), |
682 | + ]) |
683 | + if self.openstack: |
684 | + os_origin = self.openstack.split(':')[1] |
685 | + return os_origin.split('%s-' % self.series)[1].split('/')[0] |
686 | + else: |
687 | + return releases[self.series] |
688 | |
689 | === modified file 'unit_tests/test_nova_compute_hooks.py' |
690 | --- unit_tests/test_nova_compute_hooks.py 2015-03-31 11:43:21 +0000 |
691 | +++ unit_tests/test_nova_compute_hooks.py 2015-03-31 15:02:03 +0000 |
692 | @@ -85,6 +85,7 @@ |
693 | @patch.object(hooks, 'compute_joined') |
694 | def test_config_changed_with_migration(self, compute_joined): |
695 | self.migration_enabled.return_value = True |
696 | + _zmq_joined = self.patch('zeromq_configuration_relation_joined') |
697 | self.test_config.set('migration-auth-type', 'ssh') |
698 | self.relation_ids.return_value = [ |
699 | 'cloud-compute:0', |
700 | @@ -97,10 +98,12 @@ |
701 | ] |
702 | self.assertEquals(ex, compute_joined.call_args_list) |
703 | self.assertTrue(self.initialize_ssh_keys.called) |
704 | + self.assertTrue(_zmq_joined.called) |
705 | |
706 | @patch.object(hooks, 'compute_joined') |
707 | def test_config_changed_with_resize(self, compute_joined): |
708 | self.test_config.set('enable-resize', True) |
709 | + _zmq_joined = self.patch('zeromq_configuration_relation_joined') |
710 | self.relation_ids.return_value = [ |
711 | 'cloud-compute:0', |
712 | 'cloud-compute:1' |
713 | @@ -113,10 +116,12 @@ |
714 | self.assertEquals(ex, compute_joined.call_args_list) |
715 | self.initialize_ssh_keys.assert_called_with(user='nova') |
716 | self.enable_shell.assert_called_with(user='nova') |
717 | + self.assertTrue(_zmq_joined.called) |
718 | |
719 | @patch.object(hooks, 'compute_joined') |
720 | def test_config_changed_without_resize(self, compute_joined): |
721 | self.test_config.set('enable-resize', False) |
722 | + _zmq_joined = self.patch('zeromq_configuration_relation_joined') |
723 | self.relation_ids.return_value = [ |
724 | 'cloud-compute:0', |
725 | 'cloud-compute:1' |
726 | @@ -128,6 +133,7 @@ |
727 | ] |
728 | self.assertEquals(ex, compute_joined.call_args_list) |
729 | self.disable_shell.assert_called_with(user='nova') |
730 | + self.assertTrue(_zmq_joined.called) |
731 | |
732 | @patch.object(hooks, 'compute_joined') |
733 | def test_config_changed_no_upgrade_no_migration(self, compute_joined): |
UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.
#695 nova-compute-next for gnuoy mp238879
charm_lint_check
This build: 10.98.191. 181:8080/ job/charm_ lint_check/ 695/
http://
MP URL: /code.launchpad .net/~openstack -charmers/ charms/ trusty/ nova-compute/ 0mq/+merge/ 238879
https:/
Proposed branch:
lp:~openstack-charmers/charms/trusty/nova-compute/0mq
Results summary:
LINT FAIL: lint-check failed
LINT Results (max last 25 lines) from jenkins/ workspace/ charm_lint_ check/make- lint.695: compute_ utils.py: 93:1: E101 indentation contains mixed spaces and tabs compute_ utils.py: 93:1: W191 indentation contains tabs compute_ utils.py: 93:8: E128 continuation line under-indented for visual indent
/var/lib/
hooks/nova_
hooks/nova_
hooks/nova_
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. 10.98.191. 181:8080/
http://