Merge lp:~hopem/charms/trusty/nova-cloud-controller/nova-alchemy-flags into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 137
Proposed branch: lp:~hopem/charms/trusty/nova-cloud-controller/nova-alchemy-flags
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 175 lines (+63/-17)
5 files modified
config.yaml (+12/-6)
hooks/nova_cc_utils.py (+3/-0)
templates/icehouse/nova.conf (+3/-3)
templates/parts/database-v2 (+12/-0)
tests/basic_deployment.py (+33/-8)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-cloud-controller/nova-alchemy-flags
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+245451@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Edward Hope-Morley (hopem) wrote :

Also changed 'sql_connection' to 'connection' and moved it all into [database] section since that has been the convention since at least Icehouse and is required for other db options.

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

charm_lint_check #579 nova-cloud-controller-next for hopem mp245451
    LINT OK: passed

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

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

charm_unit_test #608 nova-cloud-controller-next for hopem mp245451
    UNIT OK: passed

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

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

charm_amulet_test #734 nova-cloud-controller-next for hopem mp245451
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9687187/
Build: http://10.245.162.77:8080/job/charm_amulet_test/734/

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

charm_lint_check #580 nova-cloud-controller-next for hopem mp245451
    LINT OK: passed

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

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

charm_unit_test #609 nova-cloud-controller-next for hopem mp245451
    UNIT OK: passed

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

136. By Edward Hope-Morley

fixed amulet test error and lint issue in tests/basic_deployment.py

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

charm_lint_check #581 nova-cloud-controller-next for hopem mp245451
    LINT OK: passed

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

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

charm_unit_test #610 nova-cloud-controller-next for hopem mp245451
    UNIT OK: passed

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

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

charm_amulet_test #768 nova-cloud-controller-next for hopem mp245451
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9688129/
Build: http://10.245.162.77:8080/job/charm_amulet_test/768/

137. By Edward Hope-Morley

fix amulet

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

charm_lint_check #717 nova-cloud-controller-next for hopem mp245451
    LINT OK: passed

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

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

charm_unit_test #746 nova-cloud-controller-next for hopem mp245451
    UNIT OK: passed

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

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

charm_amulet_test #902 nova-cloud-controller-next for hopem mp245451
    AMULET OK: passed

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

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2014-10-30 03:30:36 +0000
+++ config.yaml 2015-01-13 11:55:06 +0000
@@ -30,6 +30,12 @@
30 default: nova30 default: nova
31 type: string31 type: string
32 description: Database name32 description: Database name
33 nova-alchemy-flags:
34 type: string
35 default:
36 description: |
37 Comma-separated list of key=value sqlalchemy related config flags to be
38 set in nova.conf [database] section.
33 neutron-database-user:39 neutron-database-user:
34 default: neutron40 default: neutron
35 type: string41 type: string
@@ -38,6 +44,12 @@
38 default: neutron44 default: neutron
39 type: string45 type: string
40 description: Database name for Neutron (if enabled)46 description: Database name for Neutron (if enabled)
47 neutron-alchemy-flags:
48 type: string
49 default:
50 description: |
51 Comma-separated list of key=value sqlalchemy related config flags to be
52 set in neutron.conf [database] section.
41 network-manager:53 network-manager:
42 default: FlatDHCPManager54 default: FlatDHCPManager
43 type: string55 type: string
@@ -139,12 +151,6 @@
139 type: string151 type: string
140 default:152 default:
141 description: SSL key to use with certificate specified as ssl_cert.153 description: SSL key to use with certificate specified as ssl_cert.
142 neutron-alchemy-flags:
143 type: string
144 default:
145 description: |
146 Comma separated list of key=value sqlalchemy related config flags to be
147 set in plugin ini file.
148 ssl_ca:154 ssl_ca:
149 type: string155 type: string
150 default:156 default:
151157
=== modified file 'hooks/nova_cc_utils.py'
--- hooks/nova_cc_utils.py 2014-12-19 10:25:03 +0000
+++ hooks/nova_cc_utils.py 2015-01-13 11:55:06 +0000
@@ -110,6 +110,9 @@
110 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),110 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),
111 context.SharedDBContext(111 context.SharedDBContext(
112 relation_prefix='nova', ssl_dir=NOVA_CONF_DIR),112 relation_prefix='nova', ssl_dir=NOVA_CONF_DIR),
113 context.OSConfigFlagContext(
114 charm_flag='nova-alchemy-flags',
115 template_flag='nova_alchemy_flags'),
113 nova_cc_context.NovaPostgresqlDBContext(),116 nova_cc_context.NovaPostgresqlDBContext(),
114 context.ImageServiceContext(),117 context.ImageServiceContext(),
115 context.OSConfigFlagContext(),118 context.OSConfigFlagContext(),
116119
=== modified file 'templates/icehouse/nova.conf'
--- templates/icehouse/nova.conf 2014-12-16 14:08:58 +0000
+++ templates/icehouse/nova.conf 2015-01-13 11:55:06 +0000
@@ -46,8 +46,6 @@
46keystone_ec2_url = {{ keystone_ec2_url }}46keystone_ec2_url = {{ keystone_ec2_url }}
47{% endif -%}47{% endif -%}
4848
49{% include "parts/database" %}
50
51{% include "parts/rabbitmq" %}49{% include "parts/rabbitmq" %}
5250
53{% if glance_api_servers -%}51{% if glance_api_servers -%}
@@ -134,7 +132,9 @@
134{% for key, value in sections['DEFAULT'] -%}132{% for key, value in sections['DEFAULT'] -%}
135{{ key }} = {{ value }}133{{ key }} = {{ value }}
136{% endfor -%}134{% endfor -%}
137{% endif -%}135{% endif %}
136
137{% include "parts/database-v2" %}
138138
139{% if auth_host -%}139{% if auth_host -%}
140[keystone_authtoken]140[keystone_authtoken]
141141
=== added file 'templates/parts/database-v2'
--- templates/parts/database-v2 1970-01-01 00:00:00 +0000
+++ templates/parts/database-v2 2015-01-13 11:55:06 +0000
@@ -0,0 +1,12 @@
1[database]
2{% if database_host -%}
3connection = {{ database_type }}://{{ database_user }}:{{ database_password }}@{{ database_host }}/{{ database }}{% if database_ssl_ca %}?ssl_ca={{ database_ssl_ca }}{% if database_ssl_cert %}&ssl_cert={{ database_ssl_cert }}&ssl_key={{ database_ssl_key }}{% endif %}{% endif %}
4{% endif -%}
5{% if not nova_alchemy_flags or 'max_pool_size' not in nova_alchemy_flags.iterkeys() -%}
6max_pool_size = {{ workers }}
7{% endif -%}
8{% if nova_alchemy_flags -%}
9{% for key, value in nova_alchemy_flags.iteritems() -%}
10{{ key }} = {{ value }}
11{% endfor -%}
12{% endif -%}
013
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-01-05 14:40:20 +0000
+++ tests/basic_deployment.py 2015-01-13 11:55:06 +0000
@@ -430,12 +430,6 @@
430 'nova-cloud-controller:amqp')430 'nova-cloud-controller:amqp')
431 glance_relation = self.glance_sentry.relation('image-service',431 glance_relation = self.glance_sentry.relation('image-service',
432 'nova-cloud-controller:image-service')432 'nova-cloud-controller:image-service')
433 mysql_relation = self.mysql_sentry.relation('shared-db',
434 'nova-cloud-controller:shared-db')
435 db_uri = "mysql://{}:{}@{}/{}".format('nova',
436 mysql_relation['nova_password'],
437 mysql_relation['db_host'],
438 'nova')
439 keystone_ep = self.keystone_demo.service_catalog.url_for(\433 keystone_ep = self.keystone_demo.service_catalog.url_for(\
440 service_type='identity',434 service_type='identity',
441 endpoint_type='publicURL')435 endpoint_type='publicURL')
@@ -460,7 +454,6 @@
460 'auth_strategy': 'keystone',454 'auth_strategy': 'keystone',
461 'compute_driver': 'libvirt.LibvirtDriver',455 'compute_driver': 'libvirt.LibvirtDriver',
462 'keystone_ec2_url': keystone_ec2,456 'keystone_ec2_url': keystone_ec2,
463 'sql_connection': db_uri,
464 'rabbit_userid': 'nova',457 'rabbit_userid': 'nova',
465 'rabbit_virtual_host': 'openstack',458 'rabbit_virtual_host': 'openstack',
466 'rabbit_password': rabbitmq_relation['password'],459 'rabbit_password': rabbitmq_relation['password'],
@@ -471,11 +464,43 @@
471 'osapi_compute_listen_port': '8764',464 'osapi_compute_listen_port': '8764',
472 'ec2_listen_port': '8763'}465 'ec2_listen_port': '8763'}
473466
467 # This has been moved to [database] for I and above
468 if self._get_openstack_release() < self.precise_icehouse:
469 mysql_relation = self.mysql_sentry.relation('shared-db',
470 'nova-cloud-controller:shared-db')
471 db_uri = "mysql://{}:{}@{}/{}".format('nova',
472 mysql_relation['nova_password'],
473 mysql_relation['db_host'],
474 'nova')
475 expected['sql_connection'] = db_uri
476
474 ret = u.validate_config_data(unit, conf, 'DEFAULT', expected)477 ret = u.validate_config_data(unit, conf, 'DEFAULT', expected)
475 if ret:478 if ret:
476 message = "nova config error: {}".format(ret)479 message = "nova config error: {}".format(ret)
477 amulet.raise_status(amulet.FAIL, msg=message)480 amulet.raise_status(amulet.FAIL, msg=message)
478481
482 def test_nova_database_config(self):
483 """Verify the data in the nova config file's database section."""
484 # NOTE(hopem): this is >= Icehouse only
485 if self._get_openstack_release() < self.precise_icehouse:
486 return
487
488 unit = self.nova_cc_sentry
489 conf = '/etc/nova/nova.conf'
490 mysql_relation = self.mysql_sentry.relation('shared-db',
491 'nova-cloud-controller:shared-db')
492 db_uri = "mysql://{}:{}@{}/{}".format('nova',
493 mysql_relation['nova_password'],
494 mysql_relation['db_host'],
495 'nova')
496
497 # For >= icehouse we move away from deprecated sql_connection
498 expected = {'connection': db_uri}
499
500 ret = u.validate_config_data(unit, conf, 'database', expected)
501 if ret:
502 message = "nova config error: {}".format(ret)
503 amulet.raise_status(amulet.FAIL, msg=message)
479504
480 def test_nova_keystone_authtoken_config(self):505 def test_nova_keystone_authtoken_config(self):
481 """Verify the data in the nova config file's keystone_authtoken506 """Verify the data in the nova config file's keystone_authtoken
@@ -526,7 +551,7 @@
526 found = True551 found = True
527 if instance.status != 'ACTIVE':552 if instance.status != 'ACTIVE':
528 msg = "cirros instance is not active"553 msg = "cirros instance is not active"
529 amulet.raise_status(amulet.FAIL, msg=message)554 amulet.raise_status(amulet.FAIL, msg=msg)
530555
531 if not found:556 if not found:
532 message = "nova cirros instance does not exist"557 message = "nova cirros instance does not exist"

Subscribers

People subscribed via source and target branches