Merge lp:~corey.bryant/charms/trusty/nova-cloud-controller/amulet-git-fixups into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Corey Bryant
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
Reviewer Review Type Date Requested Status
OpenStack Charmers Pending
Review via email: mp+264569@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Amulet deploy from source updates:
  * Install amulet pre-req python-distro-info
  * Use modified icehouse branches due to requirements issues

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

charm_lint_check #6122 nova-cloud-controller-next for corey.bryant mp264569
    LINT OK: passed

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

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

charm_unit_test #5754 nova-cloud-controller-next for corey.bryant mp264569
    UNIT OK: passed

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

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

charm_amulet_test #5111 nova-cloud-controller-next for corey.bryant mp264569
    AMULET OK: passed

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

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

charm_lint_check #6126 nova-cloud-controller-next for corey.bryant mp264569
    LINT OK: passed

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

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

charm_unit_test #5758 nova-cloud-controller-next for corey.bryant mp264569
    UNIT OK: passed

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

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

charm_amulet_test #5115 nova-cloud-controller-next for corey.bryant mp264569
    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://paste.ubuntu.com/11875238/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5115/

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

charm_lint_check #6176 nova-cloud-controller-next for corey.bryant mp264569
    LINT OK: passed

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

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

charm_unit_test #5808 nova-cloud-controller-next for corey.bryant mp264569
    UNIT OK: passed

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

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

charm_lint_check #6177 nova-cloud-controller-next for corey.bryant mp264569
    LINT OK: passed

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

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

charm_unit_test #5809 nova-cloud-controller-next for corey.bryant mp264569
    UNIT OK: passed

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

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

charm_amulet_test #5120 nova-cloud-controller-next for corey.bryant mp264569
    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://paste.ubuntu.com/11879313/
Build: http://10.245.162.77:8080/job/charm_amulet_test/5120/

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

charm_amulet_test #5121 nova-cloud-controller-next for corey.bryant mp264569
    AMULET OK: passed

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

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

charm_lint_check #6226 nova-cloud-controller-next for corey.bryant mp264569
    LINT OK: passed

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

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

charm_unit_test #5858 nova-cloud-controller-next for corey.bryant mp264569
    UNIT OK: passed

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

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

charm_amulet_test #5125 nova-cloud-controller-next for corey.bryant mp264569
    AMULET OK: passed

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/00-setup'
--- tests/00-setup 2014-09-29 21:03:48 +0000
+++ tests/00-setup 2015-07-14 19:28:42 +0000
@@ -5,6 +5,7 @@
5sudo add-apt-repository --yes ppa:juju/stable5sudo add-apt-repository --yes ppa:juju/stable
6sudo apt-get update --yes6sudo apt-get update --yes
7sudo apt-get install --yes python-amulet \7sudo apt-get install --yes python-amulet \
8 python-distro-info \
8 python-glanceclient \9 python-glanceclient \
9 python-keystoneclient \10 python-keystoneclient \
10 python-novaclient11 python-novaclient
1112
=== modified file 'tests/017-basic-trusty-kilo' (properties changed: -x to +x)
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-07-09 18:16:49 +0000
+++ tests/basic_deployment.py 2015-07-14 19:28:42 +0000
@@ -68,21 +68,24 @@
68 """Configure all of the services."""68 """Configure all of the services."""
69 nova_cc_config = {}69 nova_cc_config = {}
70 if self.git:70 if self.git:
71 release = self._get_openstack_release_string()71 amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY')
72 reqs_branch = 'stable/' + release72
73 reqs_repo = 'git://github.com/openstack/requirements'
74 nova_repo = 'git://github.com/openstack/nova'
73 if self._get_openstack_release() == self.trusty_icehouse:75 if self._get_openstack_release() == self.trusty_icehouse:
74 nova_branch = release + '-eol'76 reqs_repo = 'git://github.com/coreycb/requirements'
75 else:77 nova_repo = 'git://github.com/coreycb/nova'
76 nova_branch = 'stable/' + release78
77 amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY')79 branch = 'stable/' + self._get_openstack_release_string()
80
78 openstack_origin_git = {81 openstack_origin_git = {
79 'repositories': [82 'repositories': [
80 {'name': 'requirements',83 {'name': 'requirements',
81 'repository': 'git://github.com/openstack/requirements',84 'repository': reqs_repo,
82 'branch': reqs_branch},85 'branch': branch},
83 {'name': 'nova',86 {'name': 'nova',
84 'repository': 'git://github.com/openstack/nova',87 'repository': nova_repo,
85 'branch': nova_branch},88 'branch': branch},
86 ],89 ],
87 'directory': '/mnt/openstack-git',90 'directory': '/mnt/openstack-git',
88 'http_proxy': amulet_http_proxy,91 'http_proxy': amulet_http_proxy,
@@ -177,8 +180,11 @@
177 if self._get_openstack_release() >= self.precise_folsom:180 if self._get_openstack_release() >= self.precise_folsom:
178 endpoint_vol['id'] = u.not_null181 endpoint_vol['id'] = u.not_null
179 endpoint_id['id'] = u.not_null182 endpoint_id['id'] = u.not_null
180 expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol],183 if self._get_openstack_release() >= self.trusty_kilo:
181 'ec2': [endpoint_vol], 'identity': [endpoint_id]}184 expected = {'compute': [endpoint_vol], 'identity': [endpoint_id]}
185 else:
186 expected = {'s3': [endpoint_vol], 'compute': [endpoint_vol],
187 'ec2': [endpoint_vol], 'identity': [endpoint_id]}
182 actual = self.keystone_demo.service_catalog.get_endpoints()188 actual = self.keystone_demo.service_catalog.get_endpoints()
183189
184 ret = u.validate_svc_catalog_endpoint_data(expected, actual)190 ret = u.validate_svc_catalog_endpoint_data(expected, actual)
@@ -204,6 +210,9 @@
204210
205 def test_ec2_api_endpoint(self):211 def test_ec2_api_endpoint(self):
206 """Verify the EC2 api endpoint data."""212 """Verify the EC2 api endpoint data."""
213 if self._get_openstack_release() >= self.trusty_kilo:
214 return
215
207 endpoints = self.keystone.endpoints.list()216 endpoints = self.keystone.endpoints.list()
208 admin_port = internal_port = public_port = '8773'217 admin_port = internal_port = public_port = '8773'
209 expected = {'id': u.not_null,218 expected = {'id': u.not_null,
@@ -221,6 +230,9 @@
221230
222 def test_s3_api_endpoint(self):231 def test_s3_api_endpoint(self):
223 """Verify the S3 api endpoint data."""232 """Verify the S3 api endpoint data."""
233 if self._get_openstack_release() >= self.trusty_kilo:
234 return
235
224 endpoints = self.keystone.endpoints.list()236 endpoints = self.keystone.endpoints.list()
225 admin_port = internal_port = public_port = '3333'237 admin_port = internal_port = public_port = '3333'
226 expected = {'id': u.not_null,238 expected = {'id': u.not_null,
@@ -274,21 +286,22 @@
274 expected = {286 expected = {
275 'nova_internal_url': u.valid_url,287 'nova_internal_url': u.valid_url,
276 'nova_public_url': u.valid_url,288 'nova_public_url': u.valid_url,
277 's3_public_url': u.valid_url,
278 's3_service': 's3',
279 'ec2_admin_url': u.valid_url,
280 'ec2_internal_url': u.valid_url,
281 'nova_service': 'nova',289 'nova_service': 'nova',
282 's3_region': 'RegionOne',
283 'private-address': u.valid_ip,290 'private-address': u.valid_ip,
284 'nova_region': 'RegionOne',291 'nova_region': 'RegionOne',
285 'ec2_public_url': u.valid_url,
286 'ec2_region': 'RegionOne',
287 's3_internal_url': u.valid_url,
288 's3_admin_url': u.valid_url,
289 'nova_admin_url': u.valid_url,292 'nova_admin_url': u.valid_url,
290 'ec2_service': 'ec2'
291 }293 }
294 if self._get_openstack_release() < self.trusty_kilo:
295 expected['s3_admin_url'] = u.valid_url
296 expected['s3_internal_url'] = u.valid_url
297 expected['s3_public_url'] = u.valid_url
298 expected['s3_region'] = 'RegionOne'
299 expected['s3_service'] = 's3'
300 expected['ec2_admin_url'] = u.valid_url
301 expected['ec2_internal_url'] = u.valid_url
302 expected['ec2_public_url'] = u.valid_url
303 expected['ec2_region'] = 'RegionOne'
304 expected['ec2_service'] = 'ec2'
292305
293 ret = u.validate_relation_data(unit, relation, expected)306 ret = u.validate_relation_data(unit, relation, expected)
294 if ret:307 if ret:
@@ -314,6 +327,8 @@
314 'service_tenant_id': u.not_null,327 'service_tenant_id': u.not_null,
315 'service_host': u.valid_ip328 'service_host': u.valid_ip
316 }329 }
330 if self._get_openstack_release() >= self.trusty_kilo:
331 expected['service_username'] = 'nova'
317332
318 ret = u.validate_relation_data(unit, relation, expected)333 ret = u.validate_relation_data(unit, relation, expected)
319 if ret:334 if ret:
@@ -462,97 +477,137 @@
462 endpoint_type='publicURL')477 endpoint_type='publicURL')
463 keystone_ec2 = "{}/ec2tokens".format(keystone_ep)478 keystone_ec2 = "{}/ec2tokens".format(keystone_ep)
464479
465 expected = {'dhcpbridge_flagfile': '/etc/nova/nova.conf',
466 'dhcpbridge': '/usr/bin/nova-dhcpbridge',
467 'logdir': '/var/log/nova',
468 'state_path': '/var/lib/nova',
469 'lock_path': '/var/lock/nova',
470 'force_dhcp_release': 'True',
471 'iscsi_helper': 'tgtadm',
472 'libvirt_use_virtio_for_bridges': 'True',
473 'connection_type': 'libvirt',
474 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf',
475 'verbose': 'False',
476 'debug': 'False',
477 'ec2_private_dns_show_ip': 'True',
478 'api_paste_config': '/etc/nova/api-paste.ini',
479 'volumes_path': '/var/lib/nova/volumes',
480 'enabled_apis': 'ec2,osapi_compute,metadata',
481 'auth_strategy': 'keystone',
482 'compute_driver': 'libvirt.LibvirtDriver',
483 'keystone_ec2_url': keystone_ec2,
484 'rabbit_userid': 'nova',
485 'rabbit_virtual_host': 'openstack',
486 'rabbit_password': rabbitmq_relation['password'],
487 'rabbit_host': rabbitmq_relation['hostname'],
488 'glance_api_servers': glance_relation['glance-api-server'],
489 'network_manager': 'nova.network.manager.FlatDHCPManager',
490 's3_listen_port': '3323',
491 'osapi_compute_listen_port': '8764',
492 'ec2_listen_port': '8763'}
493
494 # This has been moved to [database] for I and above
495 if self._get_openstack_release() < self.precise_icehouse:
496 mysql_relation = self.mysql_sentry.relation('shared-db',
497 'nova-cloud-controller:shared-db')
498 db_uri = "mysql://{}:{}@{}/{}".format('nova',
499 mysql_relation['nova_password'],
500 mysql_relation['db_host'],
501 'nova')
502 expected['sql_connection'] = db_uri
503
504 ret = u.validate_config_data(unit, conf, 'DEFAULT', expected)
505 if ret:
506 message = "nova config error: {}".format(ret)
507 amulet.raise_status(amulet.FAIL, msg=message)
508
509 def test_nova_database_config(self):
510 """Verify the data in the nova config file's database section."""
511 # NOTE(hopem): this is >= Icehouse only
512 if self._get_openstack_release() < self.precise_icehouse:
513 return
514
515 unit = self.nova_cc_sentry
516 conf = '/etc/nova/nova.conf'
517 mysql_relation = self.mysql_sentry.relation('shared-db',
518 'nova-cloud-controller:shared-db')
519 db_uri = "mysql://{}:{}@{}/{}".format('nova',
520 mysql_relation['nova_password'],
521 mysql_relation['db_host'],
522 'nova')
523
524 # For >= icehouse we move away from deprecated sql_connection
525 expected = {'connection': db_uri}
526
527 ret = u.validate_config_data(unit, conf, 'database', expected)
528 if ret:
529 message = "nova config error: {}".format(ret)
530 amulet.raise_status(amulet.FAIL, msg=message)
531
532 def test_nova_keystone_authtoken_config(self):
533 """Verify the data in the nova config file's keystone_authtoken
534 section. This data only exists since icehouse."""
535 if self._get_openstack_release() < self.precise_icehouse:
536 return
537
538 unit = self.nova_cc_sentry
539 conf = '/etc/nova/nova.conf'
540 keystone_relation = self.keystone_sentry.relation('identity-service',480 keystone_relation = self.keystone_sentry.relation('identity-service',
541 'nova-cloud-controller:identity-service')481 'nova-cloud-controller:identity-service')
542 keystone_uri = "http://{}:{}/".format(keystone_relation['service_host'],482 keystone_uri = "http://{}:{}/".format(keystone_relation['service_host'],
543 keystone_relation['service_port'])483 keystone_relation['service_port'])
544 expected = {'auth_uri': keystone_uri,484 identity_uri = "{}://{}:{}/".format(keystone_relation['auth_protocol'],
545 'auth_host': keystone_relation['service_host'],485 keystone_relation['service_host'],
546 'auth_port': keystone_relation['auth_port'],486 keystone_relation['auth_port'])
547 'auth_protocol': keystone_relation['auth_protocol'],487
488 mysql_relation = self.mysql_sentry.relation('shared-db',
489 'nova-cloud-controller:shared-db')
490 db_uri = "mysql://{}:{}@{}/{}".format('nova',
491 mysql_relation['nova_password'],
492 mysql_relation['db_host'],
493 'nova')
494
495 expected = {
496 'DEFAULT': {
497 'dhcpbridge_flagfile': '/etc/nova/nova.conf',
498 'dhcpbridge': '/usr/bin/nova-dhcpbridge',
499 'logdir': '/var/log/nova',
500 'state_path': '/var/lib/nova',
501 'force_dhcp_release': 'True',
502 'iscsi_helper': 'tgtadm',
503 'libvirt_use_virtio_for_bridges': 'True',
504 'connection_type': 'libvirt',
505 'root_helper': 'sudo nova-rootwrap /etc/nova/rootwrap.conf',
506 'verbose': 'False',
507 'debug': 'False',
508 'ec2_private_dns_show_ip': 'True',
509 'api_paste_config': '/etc/nova/api-paste.ini',
510 'volumes_path': '/var/lib/nova/volumes',
511 'enabled_apis': 'ec2,osapi_compute,metadata',
512 'auth_strategy': 'keystone',
513 'compute_driver': 'libvirt.LibvirtDriver',
514 'keystone_ec2_url': keystone_ec2,
515 'network_manager': 'nova.network.manager.FlatDHCPManager',
516 's3_listen_port': '3323',
517 'osapi_compute_listen_port': '8764',
518 'ec2_listen_port': '8763'
519 }
520 }
521 if self._get_openstack_release() < self.trusty_kilo:
522 d = 'DEFAULT'
523 if self._get_openstack_release() < self.precise_icehouse:
524 expected[d]['sql_connection'] = db_uri
525 else:
526 database = {
527 'database': {
528 'connection': db_uri
529 }
530 }
531 keystone_authtoken = {
532 'keystone_authtoken': {
533 'auth_uri': keystone_uri,
534 'auth_host': keystone_relation['service_host'],
535 'auth_port': keystone_relation['auth_port'],
536 'auth_protocol': keystone_relation['auth_protocol'],
537 'admin_tenant_name': keystone_relation['service_tenant'],
538 'admin_user': keystone_relation['service_username'],
539 'admin_password': keystone_relation['service_password'],
540 }
541 }
542 expected.update(database)
543 expected.update(keystone_authtoken)
544 expected[d]['lock_path'] = '/var/lock/nova'
545 expected[d]['libvirt_use_virtio_for_bridges'] = 'True'
546 expected[d]['compute_driver'] = 'libvirt.LibvirtDriver'
547 expected[d]['rabbit_userid'] = 'nova'
548 expected[d]['rabbit_virtual_host'] = 'openstack'
549 expected[d]['rabbit_password'] = rabbitmq_relation['password']
550 expected[d]['rabbit_host'] = rabbitmq_relation['hostname']
551 expected[d]['glance_api_servers'] = glance_relation['glance-api-server']
552
553 else:
554 database = {
555 'database': {
556 'connection': db_uri,
557 'max_pool_size': '2',
558 }
559 }
560 glance = {
561 'glance': {
562 'api_servers': glance_relation['glance-api-server'],
563 }
564 }
565 keystone_authtoken = {
566 'keystone_authtoken': {
567 'identity_uri': identity_uri,
568 'auth_uri': keystone_uri,
548 'admin_tenant_name': keystone_relation['service_tenant'],569 'admin_tenant_name': keystone_relation['service_tenant'],
549 'admin_user': keystone_relation['service_username'],570 'admin_user': keystone_relation['service_username'],
550 'admin_password': keystone_relation['service_password']}571 'admin_password': keystone_relation['service_password'],
572 'signing_dir': '/var/cache/nova',
573 }
574 }
575 osapi_v3 = {
576 'osapi_v3': {
577 'enabled': 'True',
578 }
579 }
580 conductor = {
581 'conductor': {
582 'workers': '2',
583 }
584 }
585 oslo_messaging_rabbit = {
586 'oslo_messaging_rabbit': {
587 'rabbit_userid': 'nova',
588 'rabbit_virtual_host': 'openstack',
589 'rabbit_password': rabbitmq_relation['password'],
590 'rabbit_host': rabbitmq_relation['hostname'],
591 }
592 }
593 oslo_concurrency = {
594 'oslo_concurrency': {
595 'lock_path': '/var/lock/nova',
596 }
597 }
598 expected.update(database)
599 expected.update(glance)
600 expected.update(keystone_authtoken)
601 expected.update(osapi_v3)
602 expected.update(conductor)
603 expected.update(oslo_messaging_rabbit)
604 expected.update(oslo_concurrency)
551605
552 ret = u.validate_config_data(unit, conf, 'keystone_authtoken', expected)606 for section, pairs in expected.iteritems():
553 if ret:607 ret = u.validate_config_data(unit, conf, section, pairs)
554 message = "nova config error: {}".format(ret)608 if ret:
555 amulet.raise_status(amulet.FAIL, msg=message)609 message = "nova config error: {}".format(ret)
610 amulet.raise_status(amulet.FAIL, msg=message)
556611
557 def test_image_instance_create(self):612 def test_image_instance_create(self):
558 """Create an image/instance, verify they exist, and delete them."""613 """Create an image/instance, verify they exist, and delete them."""

Subscribers

People subscribed via source and target branches