Merge lp:~corey.bryant/charms/trusty/nova-cloud-controller/amulet-git-fixups into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
- Trusty Tahr (14.04)
- amulet-git-fixups
- Merge into next
Status: | Merged |
---|---|
Merged at revision: | 174 |
Proposed branch: | lp:~corey.bryant/charms/trusty/nova-cloud-controller/amulet-git-fixups |
Merge into: | lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next |
Diff against target: |
349 lines (+162/-106) 2 files modified
tests/00-setup (+1/-0) tests/basic_deployment.py (+161/-106) |
To merge this branch: | bzr merge lp:~corey.bryant/charms/trusty/nova-cloud-controller/amulet-git-fixups |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Charmers | Pending | ||
Review via email: mp+264569@code.launchpad.net |
Commit message
Description of the change
Corey Bryant (corey.bryant) wrote : | # |
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6122 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5754 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5111 nova-cloud-
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6126 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5758 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5115 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [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_lint_check #6176 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5808 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6177 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5809 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5120 nova-cloud-
AMULET FAIL: amulet-test failed
AMULET Results (max last 2 lines):
make: *** [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 #5121 nova-cloud-
AMULET OK: passed
Build: http://
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_lint_check #6226 nova-cloud-
LINT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_unit_test #5858 nova-cloud-
UNIT OK: passed
uosci-testing-bot (uosci-testing-bot) wrote : | # |
charm_amulet_test #5125 nova-cloud-
AMULET OK: passed
Build: http://
Preview Diff
1 | === modified file 'tests/00-setup' |
2 | --- tests/00-setup 2014-09-29 21:03:48 +0000 |
3 | +++ tests/00-setup 2015-07-14 19:28:42 +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-glanceclient \ |
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-14 19:28:42 +0000 |
17 | @@ -68,21 +68,24 @@ |
18 | """Configure all of the services.""" |
19 | nova_cc_config = {} |
20 | if self.git: |
21 | - release = self._get_openstack_release_string() |
22 | - reqs_branch = 'stable/' + release |
23 | + amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY') |
24 | + |
25 | + reqs_repo = 'git://github.com/openstack/requirements' |
26 | + nova_repo = 'git://github.com/openstack/nova' |
27 | if self._get_openstack_release() == self.trusty_icehouse: |
28 | - nova_branch = release + '-eol' |
29 | - else: |
30 | - nova_branch = 'stable/' + release |
31 | - amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY') |
32 | + reqs_repo = 'git://github.com/coreycb/requirements' |
33 | + nova_repo = 'git://github.com/coreycb/nova' |
34 | + |
35 | + branch = 'stable/' + self._get_openstack_release_string() |
36 | + |
37 | openstack_origin_git = { |
38 | 'repositories': [ |
39 | {'name': 'requirements', |
40 | - 'repository': 'git://github.com/openstack/requirements', |
41 | - 'branch': reqs_branch}, |
42 | + 'repository': reqs_repo, |
43 | + 'branch': branch}, |
44 | {'name': 'nova', |
45 | - 'repository': 'git://github.com/openstack/nova', |
46 | - 'branch': nova_branch}, |
47 | + 'repository': nova_repo, |
48 | + 'branch': branch}, |
49 | ], |
50 | 'directory': '/mnt/openstack-git', |
51 | 'http_proxy': amulet_http_proxy, |
52 | @@ -177,8 +180,11 @@ |
53 | if self._get_openstack_release() >= self.precise_folsom: |
54 | endpoint_vol['id'] = u.not_null |
55 | endpoint_id['id'] = u.not_null |
56 | - expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol], |
57 | - 'ec2': [endpoint_vol], 'identity': [endpoint_id]} |
58 | + if self._get_openstack_release() >= self.trusty_kilo: |
59 | + expected = {'compute': [endpoint_vol], 'identity': [endpoint_id]} |
60 | + else: |
61 | + expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol], |
62 | + 'ec2': [endpoint_vol], 'identity': [endpoint_id]} |
63 | actual = self.keystone_demo.service_catalog.get_endpoints() |
64 | |
65 | ret = u.validate_svc_catalog_endpoint_data(expected, actual) |
66 | @@ -204,6 +210,9 @@ |
67 | |
68 | def test_ec2_api_endpoint(self): |
69 | """Verify the EC2 api endpoint data.""" |
70 | + if self._get_openstack_release() >= self.trusty_kilo: |
71 | + return |
72 | + |
73 | endpoints = self.keystone.endpoints.list() |
74 | admin_port = internal_port = public_port = '8773' |
75 | expected = {'id': u.not_null, |
76 | @@ -221,6 +230,9 @@ |
77 | |
78 | def test_s3_api_endpoint(self): |
79 | """Verify the S3 api endpoint data.""" |
80 | + if self._get_openstack_release() >= self.trusty_kilo: |
81 | + return |
82 | + |
83 | endpoints = self.keystone.endpoints.list() |
84 | admin_port = internal_port = public_port = '3333' |
85 | expected = {'id': u.not_null, |
86 | @@ -274,21 +286,22 @@ |
87 | expected = { |
88 | 'nova_internal_url': u.valid_url, |
89 | 'nova_public_url': u.valid_url, |
90 | - 's3_public_url': u.valid_url, |
91 | - 's3_service': 's3', |
92 | - 'ec2_admin_url': u.valid_url, |
93 | - 'ec2_internal_url': u.valid_url, |
94 | 'nova_service': 'nova', |
95 | - 's3_region': 'RegionOne', |
96 | 'private-address': u.valid_ip, |
97 | 'nova_region': 'RegionOne', |
98 | - 'ec2_public_url': u.valid_url, |
99 | - 'ec2_region': 'RegionOne', |
100 | - 's3_internal_url': u.valid_url, |
101 | - 's3_admin_url': u.valid_url, |
102 | 'nova_admin_url': u.valid_url, |
103 | - 'ec2_service': 'ec2' |
104 | } |
105 | + if self._get_openstack_release() < self.trusty_kilo: |
106 | + expected['s3_admin_url'] = u.valid_url |
107 | + expected['s3_internal_url'] = u.valid_url |
108 | + expected['s3_public_url'] = u.valid_url |
109 | + expected['s3_region'] = 'RegionOne' |
110 | + expected['s3_service'] = 's3' |
111 | + expected['ec2_admin_url'] = u.valid_url |
112 | + expected['ec2_internal_url'] = u.valid_url |
113 | + expected['ec2_public_url'] = u.valid_url |
114 | + expected['ec2_region'] = 'RegionOne' |
115 | + expected['ec2_service'] = 'ec2' |
116 | |
117 | ret = u.validate_relation_data(unit, relation, expected) |
118 | if ret: |
119 | @@ -314,6 +327,8 @@ |
120 | 'service_tenant_id': u.not_null, |
121 | 'service_host': u.valid_ip |
122 | } |
123 | + if self._get_openstack_release() >= self.trusty_kilo: |
124 | + expected['service_username'] = 'nova' |
125 | |
126 | ret = u.validate_relation_data(unit, relation, expected) |
127 | if ret: |
128 | @@ -462,97 +477,137 @@ |
129 | endpoint_type='publicURL') |
130 | keystone_ec2 = "{}/ec2tokens".format(keystone_ep) |
131 | |
132 | - expected = {'dhcpbridge_flagfile': '/etc/nova/nova.conf', |
133 | - 'dhcpbridge': '/usr/bin/nova-dhcpbridge', |
134 | - 'logdir': '/var/log/nova', |
135 | - 'state_path': '/var/lib/nova', |
136 | - 'lock_path': '/var/lock/nova', |
137 | - 'force_dhcp_release': 'True', |
138 | - 'iscsi_helper': 'tgtadm', |
139 | - 'libvirt_use_virtio_for_bridges': 'True', |
140 | - 'connection_type': 'libvirt', |
141 | - 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf', |
142 | - 'verbose': 'False', |
143 | - 'debug': 'False', |
144 | - 'ec2_private_dns_show_ip': 'True', |
145 | - 'api_paste_config': '/etc/nova/api-paste.ini', |
146 | - 'volumes_path': '/var/lib/nova/volumes', |
147 | - 'enabled_apis': 'ec2,osapi_compute,metadata', |
148 | - 'auth_strategy': 'keystone', |
149 | - 'compute_driver': 'libvirt.LibvirtDriver', |
150 | - 'keystone_ec2_url': keystone_ec2, |
151 | - 'rabbit_userid': 'nova', |
152 | - 'rabbit_virtual_host': 'openstack', |
153 | - 'rabbit_password': rabbitmq_relation['password'], |
154 | - 'rabbit_host': rabbitmq_relation['hostname'], |
155 | - 'glance_api_servers': glance_relation['glance-api-server'], |
156 | - 'network_manager': 'nova.network.manager.FlatDHCPManager', |
157 | - 's3_listen_port': '3323', |
158 | - 'osapi_compute_listen_port': '8764', |
159 | - 'ec2_listen_port': '8763'} |
160 | - |
161 | - # This has been moved to [database] for I and above |
162 | - if self._get_openstack_release() < self.precise_icehouse: |
163 | - mysql_relation = self.mysql_sentry.relation('shared-db', |
164 | - 'nova-cloud-controller:shared-db') |
165 | - db_uri = "mysql://{}:{}@{}/{}".format('nova', |
166 | - mysql_relation['nova_password'], |
167 | - mysql_relation['db_host'], |
168 | - 'nova') |
169 | - expected['sql_connection'] = db_uri |
170 | - |
171 | - ret = u.validate_config_data(unit, conf, 'DEFAULT', expected) |
172 | - if ret: |
173 | - message = "nova config error: {}".format(ret) |
174 | - amulet.raise_status(amulet.FAIL, msg=message) |
175 | - |
176 | - def test_nova_database_config(self): |
177 | - """Verify the data in the nova config file's database section.""" |
178 | - # NOTE(hopem): this is >= Icehouse only |
179 | - if self._get_openstack_release() < self.precise_icehouse: |
180 | - return |
181 | - |
182 | - unit = self.nova_cc_sentry |
183 | - conf = '/etc/nova/nova.conf' |
184 | - mysql_relation = self.mysql_sentry.relation('shared-db', |
185 | - 'nova-cloud-controller:shared-db') |
186 | - db_uri = "mysql://{}:{}@{}/{}".format('nova', |
187 | - mysql_relation['nova_password'], |
188 | - mysql_relation['db_host'], |
189 | - 'nova') |
190 | - |
191 | - # For >= icehouse we move away from deprecated sql_connection |
192 | - expected = {'connection': db_uri} |
193 | - |
194 | - ret = u.validate_config_data(unit, conf, 'database', expected) |
195 | - if ret: |
196 | - message = "nova config error: {}".format(ret) |
197 | - amulet.raise_status(amulet.FAIL, msg=message) |
198 | - |
199 | - def test_nova_keystone_authtoken_config(self): |
200 | - """Verify the data in the nova config file's keystone_authtoken |
201 | - section. This data only exists since icehouse.""" |
202 | - if self._get_openstack_release() < self.precise_icehouse: |
203 | - return |
204 | - |
205 | - unit = self.nova_cc_sentry |
206 | - conf = '/etc/nova/nova.conf' |
207 | keystone_relation = self.keystone_sentry.relation('identity-service', |
208 | 'nova-cloud-controller:identity-service') |
209 | keystone_uri = "http://{}:{}/".format(keystone_relation['service_host'], |
210 | keystone_relation['service_port']) |
211 | - expected = {'auth_uri': keystone_uri, |
212 | - 'auth_host': keystone_relation['service_host'], |
213 | - 'auth_port': keystone_relation['auth_port'], |
214 | - 'auth_protocol': keystone_relation['auth_protocol'], |
215 | + identity_uri = "{}://{}:{}/".format(keystone_relation['auth_protocol'], |
216 | + keystone_relation['service_host'], |
217 | + keystone_relation['auth_port']) |
218 | + |
219 | + mysql_relation = self.mysql_sentry.relation('shared-db', |
220 | + 'nova-cloud-controller:shared-db') |
221 | + db_uri = "mysql://{}:{}@{}/{}".format('nova', |
222 | + mysql_relation['nova_password'], |
223 | + mysql_relation['db_host'], |
224 | + 'nova') |
225 | + |
226 | + expected = { |
227 | + 'DEFAULT': { |
228 | + 'dhcpbridge_flagfile': '/etc/nova/nova.conf', |
229 | + 'dhcpbridge': '/usr/bin/nova-dhcpbridge', |
230 | + 'logdir': '/var/log/nova', |
231 | + 'state_path': '/var/lib/nova', |
232 | + 'force_dhcp_release': 'True', |
233 | + 'iscsi_helper': 'tgtadm', |
234 | + 'libvirt_use_virtio_for_bridges': 'True', |
235 | + 'connection_type': 'libvirt', |
236 | + 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf', |
237 | + 'verbose': 'False', |
238 | + 'debug': 'False', |
239 | + 'ec2_private_dns_show_ip': 'True', |
240 | + 'api_paste_config': '/etc/nova/api-paste.ini', |
241 | + 'volumes_path': '/var/lib/nova/volumes', |
242 | + 'enabled_apis': 'ec2,osapi_compute,metadata', |
243 | + 'auth_strategy': 'keystone', |
244 | + 'compute_driver': 'libvirt.LibvirtDriver', |
245 | + 'keystone_ec2_url': keystone_ec2, |
246 | + 'network_manager': 'nova.network.manager.FlatDHCPManager', |
247 | + 's3_listen_port': '3323', |
248 | + 'osapi_compute_listen_port': '8764', |
249 | + 'ec2_listen_port': '8763' |
250 | + } |
251 | + } |
252 | + if self._get_openstack_release() < self.trusty_kilo: |
253 | + d = 'DEFAULT' |
254 | + if self._get_openstack_release() < self.precise_icehouse: |
255 | + expected[d]['sql_connection'] = db_uri |
256 | + else: |
257 | + database = { |
258 | + 'database': { |
259 | + 'connection': db_uri |
260 | + } |
261 | + } |
262 | + keystone_authtoken = { |
263 | + 'keystone_authtoken': { |
264 | + 'auth_uri': keystone_uri, |
265 | + 'auth_host': keystone_relation['service_host'], |
266 | + 'auth_port': keystone_relation['auth_port'], |
267 | + 'auth_protocol': keystone_relation['auth_protocol'], |
268 | + 'admin_tenant_name': keystone_relation['service_tenant'], |
269 | + 'admin_user': keystone_relation['service_username'], |
270 | + 'admin_password': keystone_relation['service_password'], |
271 | + } |
272 | + } |
273 | + expected.update(database) |
274 | + expected.update(keystone_authtoken) |
275 | + expected[d]['lock_path'] = '/var/lock/nova' |
276 | + expected[d]['libvirt_use_virtio_for_bridges'] = 'True' |
277 | + expected[d]['compute_driver'] = 'libvirt.LibvirtDriver' |
278 | + expected[d]['rabbit_userid'] = 'nova' |
279 | + expected[d]['rabbit_virtual_host'] = 'openstack' |
280 | + expected[d]['rabbit_password'] = rabbitmq_relation['password'] |
281 | + expected[d]['rabbit_host'] = rabbitmq_relation['hostname'] |
282 | + expected[d]['glance_api_servers'] = glance_relation['glance-api-server'] |
283 | + |
284 | + else: |
285 | + database = { |
286 | + 'database': { |
287 | + 'connection': db_uri, |
288 | + 'max_pool_size': '2', |
289 | + } |
290 | + } |
291 | + glance = { |
292 | + 'glance': { |
293 | + 'api_servers': glance_relation['glance-api-server'], |
294 | + } |
295 | + } |
296 | + keystone_authtoken = { |
297 | + 'keystone_authtoken': { |
298 | + 'identity_uri': identity_uri, |
299 | + 'auth_uri': keystone_uri, |
300 | 'admin_tenant_name': keystone_relation['service_tenant'], |
301 | 'admin_user': keystone_relation['service_username'], |
302 | - 'admin_password': keystone_relation['service_password']} |
303 | + 'admin_password': keystone_relation['service_password'], |
304 | + 'signing_dir': '/var/cache/nova', |
305 | + } |
306 | + } |
307 | + osapi_v3 = { |
308 | + 'osapi_v3': { |
309 | + 'enabled': 'True', |
310 | + } |
311 | + } |
312 | + conductor = { |
313 | + 'conductor': { |
314 | + 'workers': '2', |
315 | + } |
316 | + } |
317 | + oslo_messaging_rabbit = { |
318 | + 'oslo_messaging_rabbit': { |
319 | + 'rabbit_userid': 'nova', |
320 | + 'rabbit_virtual_host': 'openstack', |
321 | + 'rabbit_password': rabbitmq_relation['password'], |
322 | + 'rabbit_host': rabbitmq_relation['hostname'], |
323 | + } |
324 | + } |
325 | + oslo_concurrency = { |
326 | + 'oslo_concurrency': { |
327 | + 'lock_path': '/var/lock/nova', |
328 | + } |
329 | + } |
330 | + expected.update(database) |
331 | + expected.update(glance) |
332 | + expected.update(keystone_authtoken) |
333 | + expected.update(osapi_v3) |
334 | + expected.update(conductor) |
335 | + expected.update(oslo_messaging_rabbit) |
336 | + expected.update(oslo_concurrency) |
337 | |
338 | - ret = u.validate_config_data(unit, conf, 'keystone_authtoken', expected) |
339 | - if ret: |
340 | - message = "nova config error: {}".format(ret) |
341 | - amulet.raise_status(amulet.FAIL, msg=message) |
342 | + for section, pairs in expected.iteritems(): |
343 | + ret = u.validate_config_data(unit, conf, section, pairs) |
344 | + if ret: |
345 | + message = "nova config error: {}".format(ret) |
346 | + amulet.raise_status(amulet.FAIL, msg=message) |
347 | |
348 | def test_image_instance_create(self): |
349 | """Create an image/instance, verify they exist, and delete them.""" |
Amulet deploy from source updates:
* Install amulet pre-req python-distro-info
* Use modified icehouse branches due to requirements issues