Merge lp:~corey.bryant/charms/trusty/neutron-gateway/amulet-git-fixups into lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next
- Trusty Tahr (14.04)
- amulet-git-fixups
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 127 |
Proposed branch: | lp:~corey.bryant/charms/trusty/neutron-gateway/amulet-git-fixups |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next |
Diff against target: |
320 lines (+161/-58) 2 files modified
tests/00-setup (+1/-0) tests/basic_deployment.py (+160/-58) |
To merge this branch: | bzr merge lp:~corey.bryant/charms/trusty/neutron-gateway/amulet-git-fixups |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Charmers | Pending | ||
Review via email: mp+264574@code.launchpad.net |
Commit message
Description of the change
Corey Bryant (corey.bryant) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6228 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5860 neutron-
UNIT OK: passed
- 140. By Corey Bryant
-
Minor test fix
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6230 neutron-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5862 neutron-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5127 neutron-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.
Full amulet test output: http://
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5129 neutron-
AMULET OK: passed
Build: http://
Preview Diff
1 | === modified file 'tests/00-setup' |
2 | --- tests/00-setup 2014-10-07 21:19:29 +0000 |
3 | +++ tests/00-setup 2015-07-15 14:52:25 +0000 |
4 | @@ -5,6 +5,7 @@ |
5 | sudo add-apt-repository --yes ppa:juju/stable |
6 | sudo apt-get update --yes |
7 | sudo apt-get install --yes python-amulet \ |
8 | + python-distro-info \ |
9 | python-neutronclient \ |
10 | python-keystoneclient \ |
11 | python-novaclient \ |
12 | |
13 | === modified file 'tests/017-basic-trusty-kilo' (properties changed: -x to +x) |
14 | === modified file 'tests/basic_deployment.py' |
15 | --- tests/basic_deployment.py 2015-07-09 18:16:49 +0000 |
16 | +++ tests/basic_deployment.py 2015-07-15 14:52:25 +0000 |
17 | @@ -47,6 +47,8 @@ |
18 | other_services = [{'name': 'mysql'}, |
19 | {'name': 'rabbitmq-server'}, {'name': 'keystone'}, |
20 | {'name': 'nova-cloud-controller'}] |
21 | + if self._get_openstack_release() >= self.trusty_kilo: |
22 | + other_services.append({'name': 'neutron-api'}) |
23 | super(NeutronGatewayBasicDeployment, self)._add_services(this_service, |
24 | other_services) |
25 | |
26 | @@ -62,32 +64,65 @@ |
27 | 'nova-cloud-controller:identity-service': 'keystone:identity-service', |
28 | 'nova-cloud-controller:amqp': 'rabbitmq-server:amqp' |
29 | } |
30 | + if self._get_openstack_release() >= self.trusty_kilo: |
31 | + relations['neutron-api:shared-db'] = 'mysql:shared-db' |
32 | + relations['neutron-api:amqp'] = 'rabbitmq-server:amqp' |
33 | + relations['neutron-api:neutron-api'] = 'nova-cloud-controller:neutron-api' |
34 | + relations['neutron-api:identity-service'] = 'keystone:identity-service' |
35 | super(NeutronGatewayBasicDeployment, self)._add_relations(relations) |
36 | |
37 | def _configure_services(self): |
38 | """Configure all of the services.""" |
39 | neutron_gateway_config = {} |
40 | if self.git: |
41 | - release = self._get_openstack_release_string() |
42 | - reqs_branch = 'stable/' + release |
43 | - if self._get_openstack_release() == self.trusty_icehouse: |
44 | - neutron_branch = release + '-eol' |
45 | + amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY') |
46 | + |
47 | + branch = 'stable/' + self._get_openstack_release_string() |
48 | + |
49 | + if self._get_openstack_release() >= self.trusty_kilo: |
50 | + openstack_origin_git = { |
51 | + 'repositories': [ |
52 | + {'name': 'requirements', |
53 | + 'repository': 'git://github.com/openstack/requirements', |
54 | + 'branch': branch}, |
55 | + {'name': 'neutron-fwaas', |
56 | + 'repository': 'git://github.com/openstack/neutron-fwaas', |
57 | + 'branch': branch}, |
58 | + {'name': 'neutron-lbaas', |
59 | + 'repository': 'git://github.com/openstack/neutron-lbaas', |
60 | + 'branch': branch}, |
61 | + {'name': 'neutron-vpnaas', |
62 | + 'repository': 'git://github.com/openstack/neutron-vpnaas', |
63 | + 'branch': branch}, |
64 | + {'name': 'neutron', |
65 | + 'repository': 'git://github.com/openstack/neutron', |
66 | + 'branch': branch}, |
67 | + ], |
68 | + 'directory': '/mnt/openstack-git', |
69 | + 'http_proxy': amulet_http_proxy, |
70 | + 'https_proxy': amulet_http_proxy, |
71 | + } |
72 | else: |
73 | - neutron_branch = 'stable/' + release |
74 | - amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY') |
75 | - openstack_origin_git = { |
76 | - 'repositories': [ |
77 | - {'name': 'requirements', |
78 | - 'repository': 'git://github.com/openstack/requirements', |
79 | - 'branch': reqs_branch}, |
80 | - {'name': 'neutron', |
81 | - 'repository': 'git://github.com/openstack/neutron', |
82 | - 'branch': neutron_branch}, |
83 | - ], |
84 | - 'directory': '/mnt/openstack-git', |
85 | - 'http_proxy': amulet_http_proxy, |
86 | - 'https_proxy': amulet_http_proxy, |
87 | - } |
88 | + reqs_repo = 'git://github.com/openstack/requirements' |
89 | + neutron_repo = 'git://github.com/openstack/neutron' |
90 | + if self._get_openstack_release() == self.trusty_icehouse: |
91 | + reqs_repo = 'git://github.com/coreycb/requirements' |
92 | + neutron_repo = 'git://github.com/coreycb/neutron' |
93 | + |
94 | + openstack_origin_git = { |
95 | + 'repositories': [ |
96 | + {'name': 'requirements', |
97 | + 'repository': reqs_repo, |
98 | + 'branch': branch}, |
99 | + {'name': 'neutron', |
100 | + 'repository': neutron_repo, |
101 | + 'branch': branch}, |
102 | + ], |
103 | + 'directory': '/mnt/openstack-git', |
104 | + 'http_proxy': amulet_http_proxy, |
105 | + 'https_proxy': amulet_http_proxy, |
106 | + } |
107 | + neutron_gateway_config['openstack-origin-git'] = yaml.dump(openstack_origin_git) |
108 | neutron_gateway_config['openstack-origin-git'] = yaml.dump(openstack_origin_git) |
109 | keystone_config = {'admin-password': 'openstack', |
110 | 'admin-token': 'ubuntutesting'} |
111 | @@ -258,6 +293,8 @@ |
112 | 'service_username': 'quantum_s3_ec2_nova', |
113 | 'service_tenant_name': 'services' |
114 | } |
115 | + if self._get_openstack_release() >= self.trusty_kilo: |
116 | + expected['service_username'] = 'nova' |
117 | |
118 | ret = u.validate_relation_data(unit, relation, expected) |
119 | if ret: |
120 | @@ -309,11 +346,7 @@ |
121 | 'DEFAULT': { |
122 | 'verbose': 'False', |
123 | 'debug': 'False', |
124 | - 'lock_path': '/var/lock/neutron', |
125 | - 'rabbit_userid': 'neutron', |
126 | - 'rabbit_virtual_host': 'openstack', |
127 | - 'rabbit_password': rabbitmq_relation['password'], |
128 | - 'rabbit_host': rabbitmq_relation['hostname'], |
129 | + 'core_plugin': 'neutron.plugins.ml2.plugin.Ml2Plugin', |
130 | 'control_exchange': 'neutron', |
131 | 'notification_driver': 'neutron.openstack.common.notifier.' |
132 | 'list_notifier', |
133 | @@ -325,9 +358,28 @@ |
134 | '/etc/neutron/rootwrap.conf' |
135 | } |
136 | } |
137 | - |
138 | - expected['DEFAULT']['core_plugin'] = \ |
139 | - 'neutron.plugins.ml2.plugin.Ml2Plugin' |
140 | + if self._get_openstack_release() >= self.trusty_kilo: |
141 | + oslo_concurrency = { |
142 | + 'oslo_concurrency': { |
143 | + 'lock_path':'/var/lock/neutron' |
144 | + } |
145 | + } |
146 | + oslo_messaging_rabbit = { |
147 | + 'oslo_messaging_rabbit': { |
148 | + 'rabbit_userid': 'neutron', |
149 | + 'rabbit_virtual_host': 'openstack', |
150 | + 'rabbit_password': rabbitmq_relation['password'], |
151 | + 'rabbit_host': rabbitmq_relation['hostname'], |
152 | + } |
153 | + } |
154 | + expected.update(oslo_concurrency) |
155 | + expected.update(oslo_messaging_rabbit) |
156 | + else: |
157 | + expected['DEFAULT']['lock_path'] = '/var/lock/neutron' |
158 | + expected['DEFAULT']['rabbit_userid'] = 'neutron' |
159 | + expected['DEFAULT']['rabbit_virtual_host'] = 'openstack' |
160 | + expected['DEFAULT']['rabbit_password'] = rabbitmq_relation['password'] |
161 | + expected['DEFAULT']['rabbit_host'] = rabbitmq_relation['hostname'] |
162 | |
163 | for section, pairs in expected.iteritems(): |
164 | ret = u.validate_config_data(unit, conf, section, pairs) |
165 | @@ -403,11 +455,18 @@ |
166 | |
167 | unit = self.neutron_gateway_sentry |
168 | conf = '/etc/neutron/fwaas_driver.ini' |
169 | - expected = { |
170 | - 'driver': 'neutron.services.firewall.drivers.linux.' |
171 | - 'iptables_fwaas.IptablesFwaasDriver', |
172 | - 'enabled': 'True' |
173 | - } |
174 | + if self._get_openstack_release() >= self.trusty_kilo: |
175 | + expected = { |
176 | + 'driver': 'neutron_fwaas.services.firewall.drivers.' |
177 | + 'linux.iptables_fwaas.IptablesFwaasDriver', |
178 | + 'enabled': 'True' |
179 | + } |
180 | + else: |
181 | + expected = { |
182 | + 'driver': 'neutron.services.firewall.drivers.' |
183 | + 'linux.iptables_fwaas.IptablesFwaasDriver', |
184 | + 'enabled': 'True' |
185 | + } |
186 | |
187 | ret = u.validate_config_data(unit, conf, 'fwaas', expected) |
188 | if ret: |
189 | @@ -437,6 +496,8 @@ |
190 | 'ovs_use_veth': 'True', |
191 | 'handle_internal_only_routers': 'True' |
192 | } |
193 | + if self._get_openstack_release() >= self.trusty_kilo: |
194 | + expected['admin_user'] = 'nova' |
195 | |
196 | ret = u.validate_config_data(unit, conf, 'DEFAULT', expected) |
197 | if ret: |
198 | @@ -465,6 +526,9 @@ |
199 | 'user_group': 'nogroup' |
200 | } |
201 | } |
202 | + if self._get_openstack_release() >= self.trusty_kilo: |
203 | + expected['DEFAULT']['device_driver'] = ('neutron_lbaas.services.' + |
204 | + 'loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver') |
205 | |
206 | for section, pairs in expected.iteritems(): |
207 | ret = u.validate_config_data(unit, conf, section, pairs) |
208 | @@ -495,6 +559,8 @@ |
209 | 'nova_metadata_ip': neutron_gateway_relation['private-address'], |
210 | 'nova_metadata_port': '8775' |
211 | } |
212 | + if self._get_openstack_release() >= self.trusty_kilo: |
213 | + expected['admin_user'] = 'nova' |
214 | |
215 | if self._get_openstack_release() >= self.precise_icehouse: |
216 | expected['cache_url'] = 'memory://?default_ttl=5' |
217 | @@ -545,34 +611,67 @@ |
218 | endpoint_type='publicURL') |
219 | |
220 | expected = { |
221 | - 'logdir': '/var/log/nova', |
222 | - 'state_path': '/var/lib/nova', |
223 | - 'lock_path': '/var/lock/nova', |
224 | - 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf', |
225 | - 'verbose': 'False', |
226 | - 'use_syslog': 'False', |
227 | - 'api_paste_config': '/etc/nova/api-paste.ini', |
228 | - 'enabled_apis': 'metadata', |
229 | - 'multi_host': 'True', |
230 | - 'service_neutron_metadata_proxy': 'True', |
231 | - 'rabbit_userid': 'neutron', |
232 | - 'rabbit_virtual_host': 'openstack', |
233 | - 'rabbit_password': rabbitmq_relation['password'], |
234 | - 'rabbit_host': rabbitmq_relation['hostname'], |
235 | - 'network_api_class': 'nova.network.neutronv2.api.API', |
236 | - 'neutron_auth_strategy': 'keystone', |
237 | - 'neutron_url': nova_cc_relation['quantum_url'], |
238 | - 'neutron_admin_tenant_name': 'services', |
239 | - 'neutron_admin_username': 'quantum_s3_ec2_nova', |
240 | - 'neutron_admin_password': nova_cc_relation['service_password'], |
241 | - 'neutron_admin_auth_url': ep |
242 | - |
243 | + 'DEFAULT': { |
244 | + 'logdir': '/var/log/nova', |
245 | + 'state_path': '/var/lib/nova', |
246 | + 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf', |
247 | + 'verbose': 'False', |
248 | + 'use_syslog': 'False', |
249 | + 'api_paste_config': '/etc/nova/api-paste.ini', |
250 | + 'enabled_apis': 'metadata', |
251 | + 'multi_host': 'True', |
252 | + 'network_api_class': 'nova.network.neutronv2.api.API', |
253 | + } |
254 | } |
255 | + if self._get_openstack_release() >= self.trusty_kilo: |
256 | + neutron = { |
257 | + 'neutron': { |
258 | + 'auth_strategy': 'keystone', |
259 | + 'url': nova_cc_relation['quantum_url'], |
260 | + 'admin_tenant_name': 'services', |
261 | + 'admin_username': 'nova', |
262 | + 'admin_password': nova_cc_relation['service_password'], |
263 | + 'admin_auth_url': ep, |
264 | + 'service_metadata_proxy': 'True', |
265 | + } |
266 | + } |
267 | + oslo_concurrency = { |
268 | + 'oslo_concurrency': { |
269 | + 'lock_path':'/var/lock/nova' |
270 | + } |
271 | + } |
272 | + oslo_messaging_rabbit = { |
273 | + 'oslo_messaging_rabbit': { |
274 | + 'rabbit_userid': 'neutron', |
275 | + 'rabbit_virtual_host': 'openstack', |
276 | + 'rabbit_password': rabbitmq_relation['password'], |
277 | + 'rabbit_host': rabbitmq_relation['hostname'], |
278 | + } |
279 | + } |
280 | + expected.update(neutron) |
281 | + expected.update(oslo_concurrency) |
282 | + expected.update(oslo_messaging_rabbit) |
283 | + else: |
284 | + d = 'DEFAULT' |
285 | + expected[d]['lock_path'] = '/var/lock/nova' |
286 | + expected[d]['rabbit_userid'] = 'neutron' |
287 | + expected[d]['rabbit_virtual_host'] = 'openstack' |
288 | + expected[d]['rabbit_password'] = rabbitmq_relation['password'] |
289 | + expected[d]['rabbit_host'] = rabbitmq_relation['hostname'] |
290 | + expected[d]['service_neutron_metadata_proxy'] = 'True' |
291 | + expected[d]['neutron_auth_strategy'] = 'keystone' |
292 | + expected[d]['neutron_url'] = nova_cc_relation['quantum_url'] |
293 | + expected[d]['neutron_admin_tenant_name'] = 'services' |
294 | + expected[d]['neutron_admin_username'] = 'quantum_s3_ec2_nova' |
295 | + expected[d]['neutron_admin_password'] = \ |
296 | + nova_cc_relation['service_password'] |
297 | + expected[d]['neutron_admin_auth_url'] = ep |
298 | |
299 | - ret = u.validate_config_data(unit, conf, 'DEFAULT', expected) |
300 | - if ret: |
301 | - message = "nova config error: {}".format(ret) |
302 | - amulet.raise_status(amulet.FAIL, msg=message) |
303 | + for section, pairs in expected.iteritems(): |
304 | + ret = u.validate_config_data(unit, conf, section, pairs) |
305 | + if ret: |
306 | + message = "nova config error: {}".format(ret) |
307 | + amulet.raise_status(amulet.FAIL, msg=message) |
308 | |
309 | def test_ovs_neutron_plugin_config(self): |
310 | """Verify the data in the ovs neutron plugin config file. The ovs |
311 | @@ -621,6 +720,9 @@ |
312 | 'ipsec_status_check_interval': '60' |
313 | } |
314 | } |
315 | + if self._get_openstack_release() >= self.trusty_kilo: |
316 | + expected['vpnagent']['vpn_device_driver'] = ('neutron_vpnaas.' + |
317 | + 'services.vpn.device_drivers.ipsec.OpenSwanDriver') |
318 | |
319 | for section, pairs in expected.iteritems(): |
320 | ret = u.validate_config_data(unit, conf, section, pairs) |
Amulet deploy from source updates:
* Install amulet pre-req python-distro-info
* Use modified icehouse branches due to requirements issues
* Add neutron-*aas repos for kilo+
Also enable base/git kilo test (chmod u+x), and various fixes to update tests for kilo.