Merge lp:~james-page/charms/trusty/nova-cloud-controller/xenial into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by James Page
Status: Merged
Merged at revision: 218
Proposed branch: lp:~james-page/charms/trusty/nova-cloud-controller/xenial
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 321 lines (+215/-7)
5 files modified
hooks/nova_cc_hooks.py (+2/-2)
hooks/nova_cc_utils.py (+19/-5)
templates/mitaka/nova.conf (+174/-0)
tests/basic_deployment.py (+7/-0)
unit_tests/test_nova_cc_utils.py (+13/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/nova-cloud-controller/xenial
Reviewer Review Type Date Requested Status
Billy Olsen Approve
David Ames (community) Needs Fixing
Review via email: mp+285779@code.launchpad.net
To post a comment you must log in.
226. By James Page

Enable testing of xenial

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

charm_lint_check #238 nova-cloud-controller-next for james-page mp285779
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/238/

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

charm_unit_test #222 nova-cloud-controller-next for james-page mp285779
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/222/

Revision history for this message
David Ames (thedac) wrote :

Besides s/kilo/mitaka in the nova.conf template this looks good. Waiting for final amulet run.

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

charm_amulet_test #117 nova-cloud-controller-next for james-page mp285779
    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://paste.ubuntu.com/15019680/
Build: http://10.245.162.36:8080/job/charm_amulet_test/117/

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

charm_amulet_test #123 nova-cloud-controller-next for james-page mp285779
    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://paste.ubuntu.com/15022745/
Build: http://10.245.162.36:8080/job/charm_amulet_test/123/

227. By James Page

Fixup template header

228. By James Page

Drop tests for ec2 and objectstore on >= liberty

229. By James Page

Disable mitaka tests until all merges land

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

charm_lint_check #372 nova-cloud-controller-next for james-page mp285779
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/372/

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

charm_unit_test #294 nova-cloud-controller-next for james-page mp285779
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/294/

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

charm_lint_check #374 nova-cloud-controller-next for james-page mp285779
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/374/

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

charm_unit_test #297 nova-cloud-controller-next for james-page mp285779
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/297/

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

charm_amulet_test #146 nova-cloud-controller-next for james-page mp285779
    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://paste.ubuntu.com/15027227/
Build: http://10.245.162.36:8080/job/charm_amulet_test/146/

Revision history for this message
David Ames (thedac) wrote :

James,

This amulet fail is legit. The amulet test was changed

=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-10-16 05:41:09 +0000
+++ tests/basic_deployment.py 2016-02-12 21:25:26 +0000
@@ -195,6 +195,9 @@
             self.keystone_sentry: ['keystone'],
             self.glance_sentry: ['glance-registry', 'glance-api']
         }
+ if self._get_openstack_release_string() >= 'liberty':
+ services[self.nova_cc_sentry].remove('nova-api-ec2')
+ services[self.nova_cc_sentry].remove('nova-objectstore')

That is what is failing:
2016-02-12 17:34:18,008 service_restarted_since DEBUG: Checking that nova-api-ec2 service restarted since 1455298326.0 on nova-cloud-controller/0
nova-cloud-controller/0 `pidof -x nova-api-ec2` returned 1

juju-test.conductor.018-basic-trusty-liberty DEBUG : Got exit code: 1
juju-test.conductor.018-basic-trusty-liberty RESULT : FAIL

review: Needs Fixing
230. By James Page

Drop ec2 and objectstore checks from restart tests for liberty or greater

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

charm_lint_check #664 nova-cloud-controller-next for james-page mp285779
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/664/

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

charm_unit_test #574 nova-cloud-controller-next for james-page mp285779
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/574/

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

charm_lint_check #666 nova-cloud-controller-next for james-page mp285779
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/666/

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

charm_unit_test #576 nova-cloud-controller-next for james-page mp285779
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/576/

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

charm_amulet_test #271 nova-cloud-controller-next for james-page mp285779
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/271/

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Looks sane to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/nova_cc_hooks.py'
--- hooks/nova_cc_hooks.py 2016-02-11 15:49:38 +0000
+++ hooks/nova_cc_hooks.py 2016-02-16 19:02:24 +0000
@@ -1067,8 +1067,8 @@
1067 fp.write('manual\n')1067 fp.write('manual\n')
1068 fp.flush()1068 fp.flush()
10691069
1070 elif (not config('single-nova-consoleauth')1070 elif (not config('single-nova-consoleauth') and
1071 and console_attributes('protocol')):1071 console_attributes('protocol')):
1072 for item in ['vip_consoleauth', 'res_nova_consoleauth']:1072 for item in ['vip_consoleauth', 'res_nova_consoleauth']:
1073 if item not in data['delete_resources']:1073 if item not in data['delete_resources']:
1074 data['delete_resources'].append(item)1074 data['delete_resources'].append(item)
10751075
=== modified file 'hooks/nova_cc_utils.py'
--- hooks/nova_cc_utils.py 2016-01-08 12:30:31 +0000
+++ hooks/nova_cc_utils.py 2016-02-16 19:02:24 +0000
@@ -162,6 +162,10 @@
162 'nova-scheduler',162 'nova-scheduler',
163]163]
164164
165SERVICE_BLACKLIST = {
166 'liberty': ['nova-api-ec2', 'nova-objectstore']
167}
168
165API_PORTS = {169API_PORTS = {
166 'nova-api-ec2': 8773,170 'nova-api-ec2': 8773,
167 'nova-api-os-compute': 8774,171 'nova-api-os-compute': 8774,
@@ -186,9 +190,20 @@
186NEUTRON_DEFAULT = '/etc/default/neutron-server'190NEUTRON_DEFAULT = '/etc/default/neutron-server'
187QUANTUM_DEFAULT = '/etc/default/quantum-server'191QUANTUM_DEFAULT = '/etc/default/quantum-server'
188192
193
194def resolve_services():
195 _services = deepcopy(BASE_SERVICES)
196 os_rel = get_os_codename_install_source(config('openstack-origin'))
197 for release in SERVICE_BLACKLIST:
198 if os_rel >= release:
199 [_services.remove(service)
200 for service in SERVICE_BLACKLIST[release]]
201 return _services
202
203
189BASE_RESOURCE_MAP = OrderedDict([204BASE_RESOURCE_MAP = OrderedDict([
190 (NOVA_CONF, {205 (NOVA_CONF, {
191 'services': BASE_SERVICES,206 'services': resolve_services(),
192 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),207 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),
193 context.SharedDBContext(208 context.SharedDBContext(
194 relation_prefix='nova', ssl_dir=NOVA_CONF_DIR),209 relation_prefix='nova', ssl_dir=NOVA_CONF_DIR),
@@ -220,7 +235,7 @@
220 nova_cc_context.CloudComputeContext()],235 nova_cc_context.CloudComputeContext()],
221 }),236 }),
222 (NOVA_API_PASTE, {237 (NOVA_API_PASTE, {
223 'services': [s for s in BASE_SERVICES if 'api' in s],238 'services': [s for s in resolve_services() if 'api' in s],
224 'contexts': [nova_cc_context.IdentityServiceContext(),239 'contexts': [nova_cc_context.IdentityServiceContext(),
225 nova_cc_context.APIRateLimitingContext()],240 nova_cc_context.APIRateLimitingContext()],
226 }),241 }),
@@ -348,8 +363,7 @@
348 if plugin:363 if plugin:
349 conf = neutron_plugin_attribute(plugin, 'config', net_manager)364 conf = neutron_plugin_attribute(plugin, 'config', net_manager)
350 ctxts = (neutron_plugin_attribute(plugin, 'contexts',365 ctxts = (neutron_plugin_attribute(plugin, 'contexts',
351 net_manager)366 net_manager) or [])
352 or [])
353 services = neutron_plugin_attribute(plugin, 'server_services',367 services = neutron_plugin_attribute(plugin, 'server_services',
354 net_manager)368 net_manager)
355 resource_map[conf] = {}369 resource_map[conf] = {}
@@ -1010,7 +1024,7 @@
1010 '''Map of services and required interfaces that must be present before1024 '''Map of services and required interfaces that must be present before
1011 the service should be allowed to start'''1025 the service should be allowed to start'''
1012 gmap = {}1026 gmap = {}
1013 nova_services = deepcopy(BASE_SERVICES)1027 nova_services = resolve_services()
1014 if os_release('nova-common') not in ['essex', 'folsom']:1028 if os_release('nova-common') not in ['essex', 'folsom']:
1015 nova_services.append('nova-conductor')1029 nova_services.append('nova-conductor')
10161030
10171031
=== added file 'templates/mitaka/nova.conf'
--- templates/mitaka/nova.conf 1970-01-01 00:00:00 +0000
+++ templates/mitaka/nova.conf 2016-02-16 19:02:24 +0000
@@ -0,0 +1,174 @@
1# mitaka
2###############################################################################
3# [ WARNING ]
4# Configuration file maintained by Juju. Local changes may be overwritten.
5###############################################################################
6[DEFAULT]
7verbose={{ verbose }}
8debug={{ debug }}
9dhcpbridge_flagfile=/etc/nova/nova.conf
10dhcpbridge=/usr/bin/nova-dhcpbridge
11logdir=/var/log/nova
12state_path=/var/lib/nova
13force_dhcp_release=True
14iscsi_helper=tgtadm
15libvirt_use_virtio_for_bridges=True
16connection_type=libvirt
17root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
18ec2_private_dns_show_ip=True
19api_paste_config=/etc/nova/api-paste.ini
20volumes_path=/var/lib/nova/volumes
21enabled_apis=ec2,osapi_compute,metadata
22auth_strategy=keystone
23compute_driver=libvirt.LibvirtDriver
24use_ipv6 = {{ use_ipv6 }}
25osapi_compute_listen = {{ bind_host }}
26metadata_host = {{ bind_host }}
27s3_listen = {{ bind_host }}
28ec2_listen = {{ bind_host }}
29
30osapi_compute_workers = {{ workers }}
31ec2_workers = {{ workers }}
32
33scheduler_default_filters = {{ scheduler_default_filters }}
34cpu_allocation_ratio = {{ cpu_allocation_ratio }}
35ram_allocation_ratio = {{ ram_allocation_ratio }}
36
37use_syslog={{ use_syslog }}
38my_ip = {{ host_ip }}
39
40{% if memcached_servers %}
41memcached_servers = {{ memcached_servers }}
42{% endif %}
43
44{% include "parts/novnc" %}
45
46{% if keystone_ec2_url -%}
47keystone_ec2_url = {{ keystone_ec2_url }}
48{% endif -%}
49
50{% if rbd_pool -%}
51rbd_pool = {{ rbd_pool }}
52rbd_user = {{ rbd_user }}
53rbd_secret_uuid = {{ rbd_secret_uuid }}
54{% endif -%}
55
56{% if neutron_plugin and neutron_plugin == 'ovs' -%}
57libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
58libvirt_user_virtio_for_bridges = True
59{% if neutron_security_groups -%}
60security_group_api = {{ network_manager }}
61nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
62{% endif -%}
63{% if external_network -%}
64default_floating_pool = {{ external_network }}
65{% endif -%}
66{% endif -%}
67
68{% if neutron_plugin and neutron_plugin == 'vsp' -%}
69neutron_ovs_bridge = alubr0
70{% endif -%}
71
72{% if neutron_plugin and neutron_plugin == 'nvp' -%}
73security_group_api = neutron
74nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
75{% if external_network -%}
76default_floating_pool = {{ external_network }}
77{% endif -%}
78{% endif -%}
79
80{% if neutron_plugin and neutron_plugin == 'Calico' -%}
81security_group_api = neutron
82nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
83{% endif -%}
84
85{% if neutron_plugin and neutron_plugin == 'plumgrid' -%}
86security_group_api=neutron
87firewall_driver = nova.virt.firewall.NoopFirewallDriver
88{% endif -%}
89
90{% if network_manager_config -%}
91{% for key, value in network_manager_config.iteritems() -%}
92{{ key }} = {{ value }}
93{% endfor -%}
94{% endif -%}
95
96{% if network_manager and network_manager == 'neutron' -%}
97network_api_class = nova.network.neutronv2.api.API
98{% else -%}
99network_manager = nova.network.manager.FlatDHCPManager
100{% endif -%}
101
102{% if default_floating_pool -%}
103default_floating_pool = {{ default_floating_pool }}
104{% endif -%}
105
106{% if volume_service -%}
107volume_api_class=nova.volume.cinder.API
108{% endif -%}
109
110{% if user_config_flags -%}
111{% for key, value in user_config_flags.iteritems() -%}
112{{ key }} = {{ value }}
113{% endfor -%}
114{% endif -%}
115
116{% if listen_ports -%}
117{% for key, value in listen_ports.iteritems() -%}
118{{ key }} = {{ value }}
119{% endfor -%}
120{% endif -%}
121
122{% if sections and 'DEFAULT' in sections -%}
123{% for key, value in sections['DEFAULT'] -%}
124{{ key }} = {{ value }}
125{% endfor -%}
126{% endif %}
127
128{% include "section-zeromq" %}
129
130{% include "parts/database-v2" %}
131
132{% if glance_api_servers -%}
133[glance]
134api_servers = {{ glance_api_servers }}
135{% endif -%}
136
137{% if network_manager and network_manager == 'neutron' -%}
138[neutron]
139url = {{ neutron_url }}
140{% if auth_host -%}
141auth_plugin = password
142project_name = {{ admin_tenant_name }}
143username = {{ admin_user }}
144password = {{ admin_password }}
145auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
146region = {{ region }}
147{% endif -%}
148{% endif -%}
149
150[keystone_authtoken]
151{% if auth_host -%}
152auth_type = password
153project_name = {{ admin_tenant_name }}
154username = {{ admin_user }}
155password = {{ admin_password }}
156auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
157region = {{ region }}
158{% endif -%}
159
160[osapi_v3]
161enabled=True
162
163{% include "parts/cell" %}
164
165[conductor]
166workers = {{ workers }}
167
168{% include "section-rabbitmq-oslo" %}
169
170[oslo_concurrency]
171lock_path=/var/lock/nova
172
173[spice]
174{% include "parts/spice" %}
0175
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2015-10-16 05:41:09 +0000
+++ tests/basic_deployment.py 2016-02-16 19:02:24 +0000
@@ -195,6 +195,9 @@
195 self.keystone_sentry: ['keystone'],195 self.keystone_sentry: ['keystone'],
196 self.glance_sentry: ['glance-registry', 'glance-api']196 self.glance_sentry: ['glance-registry', 'glance-api']
197 }197 }
198 if self._get_openstack_release_string() >= 'liberty':
199 services[self.nova_cc_sentry].remove('nova-api-ec2')
200 services[self.nova_cc_sentry].remove('nova-objectstore')
198201
199 ret = u.validate_services_by_name(services)202 ret = u.validate_services_by_name(services)
200 if ret:203 if ret:
@@ -731,6 +734,10 @@
731 'nova-conductor': conf_file734 'nova-conductor': conf_file
732 }735 }
733736
737 if self._get_openstack_release_string() >= 'liberty':
738 del services['nova-api-ec2']
739 del services['nova-objectstore']
740
734 # Expected default and alternate values741 # Expected default and alternate values
735 flags_default = 'quota_cores=20,quota_instances=40,quota_ram=102400'742 flags_default = 'quota_cores=20,quota_instances=40,quota_ram=102400'
736 flags_alt = 'quota_cores=10,quota_instances=20,quota_ram=51200'743 flags_alt = 'quota_cores=10,quota_instances=20,quota_ram=51200'
737744
=== modified file 'unit_tests/test_nova_cc_utils.py'
--- unit_tests/test_nova_cc_utils.py 2015-10-06 08:37:21 +0000
+++ unit_tests/test_nova_cc_utils.py 2016-02-16 19:02:24 +0000
@@ -794,6 +794,7 @@
794 self.relation_ids.return_value = []794 self.relation_ids.return_value = []
795 self.network_manager.return_value = 'neutron'795 self.network_manager.return_value = 'neutron'
796 self.os_release.return_value = 'icehouse'796 self.os_release.return_value = 'icehouse'
797 self.get_os_codename_install_source.return_value = 'icehouse'
797 self.is_relation_made.return_value = False798 self.is_relation_made.return_value = False
798 self.assertEqual(799 self.assertEqual(
799 {'neutron-server': ['identity-service', 'amqp', 'shared-db'],800 {'neutron-server': ['identity-service', 'amqp', 'shared-db'],
@@ -807,6 +808,7 @@
807 )808 )
808 self.network_manager.return_value = 'quantum'809 self.network_manager.return_value = 'quantum'
809 self.os_release.return_value = 'grizzly'810 self.os_release.return_value = 'grizzly'
811 self.get_os_codename_install_source.return_value = 'grizzly'
810 self.assertEqual(812 self.assertEqual(
811 {'quantum-server': ['identity-service', 'amqp', 'shared-db'],813 {'quantum-server': ['identity-service', 'amqp', 'shared-db'],
812 'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],814 'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],
@@ -817,6 +819,17 @@
817 'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },819 'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
818 utils.guard_map()820 utils.guard_map()
819 )821 )
822 self.network_manager.return_value = 'neutron'
823 self.os_release.return_value = 'mitaka'
824 self.get_os_codename_install_source.return_value = 'mitaka'
825 self.assertEqual(
826 {'neutron-server': ['identity-service', 'amqp', 'shared-db'],
827 'nova-api-os-compute': ['identity-service', 'amqp', 'shared-db'],
828 'nova-cert': ['identity-service', 'amqp', 'shared-db'],
829 'nova-conductor': ['identity-service', 'amqp', 'shared-db'],
830 'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
831 utils.guard_map()
832 )
820833
821 def test_guard_map_pgsql(self):834 def test_guard_map_pgsql(self):
822 self.relation_ids.return_value = ['pgsql:1']835 self.relation_ids.return_value = ['pgsql:1']

Subscribers

People subscribed via source and target branches