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
1=== modified file 'hooks/nova_cc_hooks.py'
2--- hooks/nova_cc_hooks.py 2016-02-11 15:49:38 +0000
3+++ hooks/nova_cc_hooks.py 2016-02-16 19:02:24 +0000
4@@ -1067,8 +1067,8 @@
5 fp.write('manual\n')
6 fp.flush()
7
8- elif (not config('single-nova-consoleauth')
9- and console_attributes('protocol')):
10+ elif (not config('single-nova-consoleauth') and
11+ console_attributes('protocol')):
12 for item in ['vip_consoleauth', 'res_nova_consoleauth']:
13 if item not in data['delete_resources']:
14 data['delete_resources'].append(item)
15
16=== modified file 'hooks/nova_cc_utils.py'
17--- hooks/nova_cc_utils.py 2016-01-08 12:30:31 +0000
18+++ hooks/nova_cc_utils.py 2016-02-16 19:02:24 +0000
19@@ -162,6 +162,10 @@
20 'nova-scheduler',
21 ]
22
23+SERVICE_BLACKLIST = {
24+ 'liberty': ['nova-api-ec2', 'nova-objectstore']
25+}
26+
27 API_PORTS = {
28 'nova-api-ec2': 8773,
29 'nova-api-os-compute': 8774,
30@@ -186,9 +190,20 @@
31 NEUTRON_DEFAULT = '/etc/default/neutron-server'
32 QUANTUM_DEFAULT = '/etc/default/quantum-server'
33
34+
35+def resolve_services():
36+ _services = deepcopy(BASE_SERVICES)
37+ os_rel = get_os_codename_install_source(config('openstack-origin'))
38+ for release in SERVICE_BLACKLIST:
39+ if os_rel >= release:
40+ [_services.remove(service)
41+ for service in SERVICE_BLACKLIST[release]]
42+ return _services
43+
44+
45 BASE_RESOURCE_MAP = OrderedDict([
46 (NOVA_CONF, {
47- 'services': BASE_SERVICES,
48+ 'services': resolve_services(),
49 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),
50 context.SharedDBContext(
51 relation_prefix='nova', ssl_dir=NOVA_CONF_DIR),
52@@ -220,7 +235,7 @@
53 nova_cc_context.CloudComputeContext()],
54 }),
55 (NOVA_API_PASTE, {
56- 'services': [s for s in BASE_SERVICES if 'api' in s],
57+ 'services': [s for s in resolve_services() if 'api' in s],
58 'contexts': [nova_cc_context.IdentityServiceContext(),
59 nova_cc_context.APIRateLimitingContext()],
60 }),
61@@ -348,8 +363,7 @@
62 if plugin:
63 conf = neutron_plugin_attribute(plugin, 'config', net_manager)
64 ctxts = (neutron_plugin_attribute(plugin, 'contexts',
65- net_manager)
66- or [])
67+ net_manager) or [])
68 services = neutron_plugin_attribute(plugin, 'server_services',
69 net_manager)
70 resource_map[conf] = {}
71@@ -1010,7 +1024,7 @@
72 '''Map of services and required interfaces that must be present before
73 the service should be allowed to start'''
74 gmap = {}
75- nova_services = deepcopy(BASE_SERVICES)
76+ nova_services = resolve_services()
77 if os_release('nova-common') not in ['essex', 'folsom']:
78 nova_services.append('nova-conductor')
79
80
81=== added file 'templates/mitaka/nova.conf'
82--- templates/mitaka/nova.conf 1970-01-01 00:00:00 +0000
83+++ templates/mitaka/nova.conf 2016-02-16 19:02:24 +0000
84@@ -0,0 +1,174 @@
85+# mitaka
86+###############################################################################
87+# [ WARNING ]
88+# Configuration file maintained by Juju. Local changes may be overwritten.
89+###############################################################################
90+[DEFAULT]
91+verbose={{ verbose }}
92+debug={{ debug }}
93+dhcpbridge_flagfile=/etc/nova/nova.conf
94+dhcpbridge=/usr/bin/nova-dhcpbridge
95+logdir=/var/log/nova
96+state_path=/var/lib/nova
97+force_dhcp_release=True
98+iscsi_helper=tgtadm
99+libvirt_use_virtio_for_bridges=True
100+connection_type=libvirt
101+root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
102+ec2_private_dns_show_ip=True
103+api_paste_config=/etc/nova/api-paste.ini
104+volumes_path=/var/lib/nova/volumes
105+enabled_apis=ec2,osapi_compute,metadata
106+auth_strategy=keystone
107+compute_driver=libvirt.LibvirtDriver
108+use_ipv6 = {{ use_ipv6 }}
109+osapi_compute_listen = {{ bind_host }}
110+metadata_host = {{ bind_host }}
111+s3_listen = {{ bind_host }}
112+ec2_listen = {{ bind_host }}
113+
114+osapi_compute_workers = {{ workers }}
115+ec2_workers = {{ workers }}
116+
117+scheduler_default_filters = {{ scheduler_default_filters }}
118+cpu_allocation_ratio = {{ cpu_allocation_ratio }}
119+ram_allocation_ratio = {{ ram_allocation_ratio }}
120+
121+use_syslog={{ use_syslog }}
122+my_ip = {{ host_ip }}
123+
124+{% if memcached_servers %}
125+memcached_servers = {{ memcached_servers }}
126+{% endif %}
127+
128+{% include "parts/novnc" %}
129+
130+{% if keystone_ec2_url -%}
131+keystone_ec2_url = {{ keystone_ec2_url }}
132+{% endif -%}
133+
134+{% if rbd_pool -%}
135+rbd_pool = {{ rbd_pool }}
136+rbd_user = {{ rbd_user }}
137+rbd_secret_uuid = {{ rbd_secret_uuid }}
138+{% endif -%}
139+
140+{% if neutron_plugin and neutron_plugin == 'ovs' -%}
141+libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver
142+libvirt_user_virtio_for_bridges = True
143+{% if neutron_security_groups -%}
144+security_group_api = {{ network_manager }}
145+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
146+{% endif -%}
147+{% if external_network -%}
148+default_floating_pool = {{ external_network }}
149+{% endif -%}
150+{% endif -%}
151+
152+{% if neutron_plugin and neutron_plugin == 'vsp' -%}
153+neutron_ovs_bridge = alubr0
154+{% endif -%}
155+
156+{% if neutron_plugin and neutron_plugin == 'nvp' -%}
157+security_group_api = neutron
158+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
159+{% if external_network -%}
160+default_floating_pool = {{ external_network }}
161+{% endif -%}
162+{% endif -%}
163+
164+{% if neutron_plugin and neutron_plugin == 'Calico' -%}
165+security_group_api = neutron
166+nova_firewall_driver = nova.virt.firewall.NoopFirewallDriver
167+{% endif -%}
168+
169+{% if neutron_plugin and neutron_plugin == 'plumgrid' -%}
170+security_group_api=neutron
171+firewall_driver = nova.virt.firewall.NoopFirewallDriver
172+{% endif -%}
173+
174+{% if network_manager_config -%}
175+{% for key, value in network_manager_config.iteritems() -%}
176+{{ key }} = {{ value }}
177+{% endfor -%}
178+{% endif -%}
179+
180+{% if network_manager and network_manager == 'neutron' -%}
181+network_api_class = nova.network.neutronv2.api.API
182+{% else -%}
183+network_manager = nova.network.manager.FlatDHCPManager
184+{% endif -%}
185+
186+{% if default_floating_pool -%}
187+default_floating_pool = {{ default_floating_pool }}
188+{% endif -%}
189+
190+{% if volume_service -%}
191+volume_api_class=nova.volume.cinder.API
192+{% endif -%}
193+
194+{% if user_config_flags -%}
195+{% for key, value in user_config_flags.iteritems() -%}
196+{{ key }} = {{ value }}
197+{% endfor -%}
198+{% endif -%}
199+
200+{% if listen_ports -%}
201+{% for key, value in listen_ports.iteritems() -%}
202+{{ key }} = {{ value }}
203+{% endfor -%}
204+{% endif -%}
205+
206+{% if sections and 'DEFAULT' in sections -%}
207+{% for key, value in sections['DEFAULT'] -%}
208+{{ key }} = {{ value }}
209+{% endfor -%}
210+{% endif %}
211+
212+{% include "section-zeromq" %}
213+
214+{% include "parts/database-v2" %}
215+
216+{% if glance_api_servers -%}
217+[glance]
218+api_servers = {{ glance_api_servers }}
219+{% endif -%}
220+
221+{% if network_manager and network_manager == 'neutron' -%}
222+[neutron]
223+url = {{ neutron_url }}
224+{% if auth_host -%}
225+auth_plugin = password
226+project_name = {{ admin_tenant_name }}
227+username = {{ admin_user }}
228+password = {{ admin_password }}
229+auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
230+region = {{ region }}
231+{% endif -%}
232+{% endif -%}
233+
234+[keystone_authtoken]
235+{% if auth_host -%}
236+auth_type = password
237+project_name = {{ admin_tenant_name }}
238+username = {{ admin_user }}
239+password = {{ admin_password }}
240+auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
241+region = {{ region }}
242+{% endif -%}
243+
244+[osapi_v3]
245+enabled=True
246+
247+{% include "parts/cell" %}
248+
249+[conductor]
250+workers = {{ workers }}
251+
252+{% include "section-rabbitmq-oslo" %}
253+
254+[oslo_concurrency]
255+lock_path=/var/lock/nova
256+
257+[spice]
258+{% include "parts/spice" %}
259
260=== modified file 'tests/basic_deployment.py'
261--- tests/basic_deployment.py 2015-10-16 05:41:09 +0000
262+++ tests/basic_deployment.py 2016-02-16 19:02:24 +0000
263@@ -195,6 +195,9 @@
264 self.keystone_sentry: ['keystone'],
265 self.glance_sentry: ['glance-registry', 'glance-api']
266 }
267+ if self._get_openstack_release_string() >= 'liberty':
268+ services[self.nova_cc_sentry].remove('nova-api-ec2')
269+ services[self.nova_cc_sentry].remove('nova-objectstore')
270
271 ret = u.validate_services_by_name(services)
272 if ret:
273@@ -731,6 +734,10 @@
274 'nova-conductor': conf_file
275 }
276
277+ if self._get_openstack_release_string() >= 'liberty':
278+ del services['nova-api-ec2']
279+ del services['nova-objectstore']
280+
281 # Expected default and alternate values
282 flags_default = 'quota_cores=20,quota_instances=40,quota_ram=102400'
283 flags_alt = 'quota_cores=10,quota_instances=20,quota_ram=51200'
284
285=== modified file 'unit_tests/test_nova_cc_utils.py'
286--- unit_tests/test_nova_cc_utils.py 2015-10-06 08:37:21 +0000
287+++ unit_tests/test_nova_cc_utils.py 2016-02-16 19:02:24 +0000
288@@ -794,6 +794,7 @@
289 self.relation_ids.return_value = []
290 self.network_manager.return_value = 'neutron'
291 self.os_release.return_value = 'icehouse'
292+ self.get_os_codename_install_source.return_value = 'icehouse'
293 self.is_relation_made.return_value = False
294 self.assertEqual(
295 {'neutron-server': ['identity-service', 'amqp', 'shared-db'],
296@@ -807,6 +808,7 @@
297 )
298 self.network_manager.return_value = 'quantum'
299 self.os_release.return_value = 'grizzly'
300+ self.get_os_codename_install_source.return_value = 'grizzly'
301 self.assertEqual(
302 {'quantum-server': ['identity-service', 'amqp', 'shared-db'],
303 'nova-api-ec2': ['identity-service', 'amqp', 'shared-db'],
304@@ -817,6 +819,17 @@
305 'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
306 utils.guard_map()
307 )
308+ self.network_manager.return_value = 'neutron'
309+ self.os_release.return_value = 'mitaka'
310+ self.get_os_codename_install_source.return_value = 'mitaka'
311+ self.assertEqual(
312+ {'neutron-server': ['identity-service', 'amqp', 'shared-db'],
313+ 'nova-api-os-compute': ['identity-service', 'amqp', 'shared-db'],
314+ 'nova-cert': ['identity-service', 'amqp', 'shared-db'],
315+ 'nova-conductor': ['identity-service', 'amqp', 'shared-db'],
316+ 'nova-scheduler': ['identity-service', 'amqp', 'shared-db'], },
317+ utils.guard_map()
318+ )
319
320 def test_guard_map_pgsql(self):
321 self.relation_ids.return_value = ['pgsql:1']

Subscribers

People subscribed via source and target branches