Merge lp:~james-page/charms/trusty/neutron-gateway/mitaka-neutron-changes into lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next

Proposed by James Page
Status: Merged
Merged at revision: 167
Proposed branch: lp:~james-page/charms/trusty/neutron-gateway/mitaka-neutron-changes
Merge into: lp:~openstack-charmers-archive/charms/trusty/neutron-gateway/next
Diff against target: 191 lines (+101/-5)
4 files modified
hooks/neutron_utils.py (+29/-5)
templates/mitaka/openvswitch_agent.ini (+20/-0)
tests/basic_deployment.py (+4/-0)
unit_tests/test_neutron_utils.py (+48/-0)
To merge this branch: bzr merge lp:~james-page/charms/trusty/neutron-gateway/mitaka-neutron-changes
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Approve
Review via email: mp+286900@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #1293 neutron-gateway-next for james-page mp286900
    LINT OK: passed

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

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

charm_unit_test #1071 neutron-gateway-next for james-page mp286900
    UNIT OK: passed

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

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

charm_amulet_test #471 neutron-gateway-next for james-page mp286900
    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/15180758/
Build: http://10.245.162.36:8080/job/charm_amulet_test/471/

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

charm_amulet_test #478 neutron-gateway-next for james-page mp286900
    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/15181962/
Build: http://10.245.162.36:8080/job/charm_amulet_test/478/

170. By James Page

Rebase on tox branch

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

charm_lint_check #1302 neutron-gateway-next for james-page mp286900
    LINT OK: passed

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

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

charm_unit_test #1075 neutron-gateway-next for james-page mp286900
    UNIT OK: passed

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

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

charm_amulet_test #480 neutron-gateway-next for james-page mp286900
    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/15182551/
Build: http://10.245.162.36:8080/job/charm_amulet_test/480/

171. By James Page

Disable mitaka changes for now; re-enable once neutron-ovs landed

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

charm_lint_check #1471 neutron-gateway-next for james-page mp286900
    LINT OK: passed

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

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

charm_unit_test #1228 neutron-gateway-next for james-page mp286900
    UNIT OK: passed

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

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

charm_amulet_test #526 neutron-gateway-next for james-page mp286900
    AMULET OK: passed

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

Revision history for this message
Ryan Beisner (1chb1n) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/neutron_utils.py'
--- hooks/neutron_utils.py 2016-02-23 18:01:39 +0000
+++ hooks/neutron_utils.py 2016-02-25 14:18:55 +0000
@@ -102,6 +102,8 @@
102 "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"102 "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
103NEUTRON_ML2_PLUGIN_CONF = \103NEUTRON_ML2_PLUGIN_CONF = \
104 "/etc/neutron/plugins/ml2/ml2_conf.ini"104 "/etc/neutron/plugins/ml2/ml2_conf.ini"
105NEUTRON_OVS_AGENT_CONF = \
106 "/etc/neutron/plugins/ml2/openvswitch_agent.ini"
105NEUTRON_NVP_PLUGIN_CONF = \107NEUTRON_NVP_PLUGIN_CONF = \
106 "/etc/neutron/plugins/nicira/nvp.ini"108 "/etc/neutron/plugins/nicira/nvp.ini"
107NEUTRON_NSX_PLUGIN_CONF = \109NEUTRON_NSX_PLUGIN_CONF = \
@@ -279,6 +281,10 @@
279 # Switch out to actual metering agent package281 # Switch out to actual metering agent package
280 packages.remove('neutron-plugin-metering-agent')282 packages.remove('neutron-plugin-metering-agent')
281 packages.append('neutron-metering-agent')283 packages.append('neutron-metering-agent')
284 if source >= 'mitaka':
285 # Switch out to actual ovs agent package
286 packages.remove('neutron-plugin-openvswitch-agent')
287 packages.append('neutron-openvswitch-agent')
282 packages.extend(determine_l3ha_packages())288 packages.extend(determine_l3ha_packages())
283289
284 if git_install_requested():290 if git_install_requested():
@@ -452,6 +458,10 @@
452 'hook_contexts': [NeutronGatewayContext()],458 'hook_contexts': [NeutronGatewayContext()],
453 'services': ['neutron-plugin-openvswitch-agent']459 'services': ['neutron-plugin-openvswitch-agent']
454 },460 },
461 NEUTRON_OVS_AGENT_CONF: {
462 'hook_contexts': [NeutronGatewayContext()],
463 'services': ['neutron-openvswitch-agent']
464 },
455 EXT_PORT_CONF: {465 EXT_PORT_CONF: {
456 'hook_contexts': [ExternalPortContext()],466 'hook_contexts': [ExternalPortContext()],
457 'services': ['ext-port']467 'services': ['ext-port']
@@ -567,7 +577,12 @@
567 },577 },
568}578}
569579
570SERVICE_RENAMES = {}580SERVICE_RENAMES = {
581 'mitaka': {
582 'neutron-plugin-openvswitch-agent': 'neutron-openvswitch-agent',
583 'neutron-plugin-metering-agent': 'neutron-metering-agent',
584 }
585}
571586
572587
573def remap_service(service_name):588def remap_service(service_name):
@@ -599,10 +614,16 @@
599 config_files = deepcopy(CONFIG_FILES)614 config_files = deepcopy(CONFIG_FILES)
600 if plugin == 'ovs':615 if plugin == 'ovs':
601 # NOTE: deal with switch to ML2 plugin for >= icehouse616 # NOTE: deal with switch to ML2 plugin for >= icehouse
602 drop_config = [NEUTRON_ML2_PLUGIN_CONF]617 drop_config = [NEUTRON_ML2_PLUGIN_CONF,
618 NEUTRON_OVS_AGENT_CONF]
603 if release >= 'icehouse':619 if release >= 'icehouse':
604 # ovs -> ml2620 # ovs -> ml2
605 drop_config = [NEUTRON_OVS_PLUGIN_CONF]621 drop_config = [NEUTRON_OVS_PLUGIN_CONF,
622 NEUTRON_OVS_AGENT_CONF]
623 if release >= 'mitaka':
624 # ml2 -> ovs_agent
625 drop_config = [NEUTRON_OVS_PLUGIN_CONF,
626 NEUTRON_ML2_PLUGIN_CONF]
606627
607 for _config in drop_config:628 for _config in drop_config:
608 if _config in config_files[name][plugin]:629 if _config in config_files[name][plugin]:
@@ -637,11 +658,14 @@
637658
638659
639def stop_services():660def stop_services():
661 release = get_os_codename_install_source(config('openstack-origin'))
662 plugin = remap_plugin(config('plugin'))
640 name = networking_name()663 name = networking_name()
664 config_files = resolve_config_files(name, plugin, release)
641 svcs = set()665 svcs = set()
642 for ctxt in CONFIG_FILES[name][config('plugin')].itervalues():666 for ctxt in config_files[name][config('plugin')].itervalues():
643 for svc in ctxt['services']:667 for svc in ctxt['services']:
644 svcs.add(svc)668 svcs.add(remap_service(svc))
645 for svc in svcs:669 for svc in svcs:
646 service_stop(svc)670 service_stop(svc)
647671
648672
=== added file 'templates/mitaka/openvswitch_agent.ini'
--- templates/mitaka/openvswitch_agent.ini 1970-01-01 00:00:00 +0000
+++ templates/mitaka/openvswitch_agent.ini 2016-02-25 14:18:55 +0000
@@ -0,0 +1,20 @@
1# mitaka
2###############################################################################
3# [ WARNING ]
4# Configuration file maintained by Juju. Local changes may be overwritten.
5###############################################################################
6[ovs]
7enable_tunneling = True
8local_ip = {{ local_ip }}
9bridge_mappings = {{ bridge_mappings }}
10
11[agent]
12tunnel_types = {{ overlay_network_type }}
13l2_population = {{ l2_population }}
14enable_distributed_routing = {{ enable_dvr }}
15{% if veth_mtu -%}
16veth_mtu = {{ veth_mtu }}
17{% endif %}
18
19[securitygroup]
20firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
021
=== modified file 'tests/019-basic-trusty-mitaka' (properties changed: +x to -x)
=== modified file 'tests/basic_deployment.py'
--- tests/basic_deployment.py 2016-02-17 11:43:27 +0000
+++ tests/basic_deployment.py 2016-02-25 14:18:55 +0000
@@ -185,6 +185,10 @@
185185
186 if self._get_openstack_release() <= self.trusty_juno:186 if self._get_openstack_release() <= self.trusty_juno:
187 neutron_services.append('neutron-vpn-agent')187 neutron_services.append('neutron-vpn-agent')
188 if self._get_openstack_release() >= self.trusty_mitaka:
189 # neutron-plugin-openvswitch-agent -> neutron-openvswitch-agent
190 neutron_services.remove('neutron-plugin-openvswitch-agent')
191 neutron_services.append('neutron-openvswitch-agent')
188192
189 nova_cc_services = ['nova-api-ec2',193 nova_cc_services = ['nova-api-ec2',
190 'nova-api-os-compute',194 'nova-api-os-compute',
191195
=== modified file 'unit_tests/test_neutron_utils.py'
--- unit_tests/test_neutron_utils.py 2016-02-23 18:01:39 +0000
+++ unit_tests/test_neutron_utils.py 2016-02-25 14:18:55 +0000
@@ -170,6 +170,19 @@
170 self.assertTrue('python-pymysql' in packages)170 self.assertTrue('python-pymysql' in packages)
171171
172 @patch.object(neutron_utils, 'git_install_requested')172 @patch.object(neutron_utils, 'git_install_requested')
173 def test_get_packages_ovs_mitaka(self, git_requested):
174 git_requested.return_value = False
175 self.config.return_value = 'ovs'
176 self.get_os_codename_install_source.return_value = 'mitaka'
177 packages = neutron_utils.get_packages()
178 self.assertTrue('neutron-metering-agent' in packages)
179 self.assertFalse('neutron-plugin-metering-agent' in packages)
180 self.assertTrue('neutron-openvswitch-agent' in packages)
181 self.assertFalse('neutron-plugin-openvswitch-agent' in packages)
182 self.assertFalse('python-mysqldb' in packages)
183 self.assertTrue('python-pymysql' in packages)
184
185 @patch.object(neutron_utils, 'git_install_requested')
173 def test_get_packages_l3ha(self, git_requested):186 def test_get_packages_l3ha(self, git_requested):
174 git_requested.return_value = False187 git_requested.return_value = False
175 self.config.return_value = 'ovs'188 self.config.return_value = 'ovs'
@@ -355,6 +368,41 @@
355368
356 self.assertDictEqual(neutron_utils.restart_map(), ex_map)369 self.assertDictEqual(neutron_utils.restart_map(), ex_map)
357370
371 def test_restart_map_ovs_mitaka(self):
372 self.config.return_value = 'ovs'
373 self.get_os_codename_install_source.return_value = 'mitaka'
374 ex_map = {
375 neutron_utils.NEUTRON_CONF: ['neutron-l3-agent',
376 'neutron-dhcp-agent',
377 'neutron-metadata-agent',
378 'neutron-openvswitch-agent',
379 'neutron-metering-agent',
380 'neutron-lbaas-agent',
381 'neutron-plugin-vpn-agent',
382 'neutron-vpn-agent'],
383 neutron_utils.NEUTRON_DNSMASQ_CONF: ['neutron-dhcp-agent'],
384 neutron_utils.NEUTRON_LBAAS_AGENT_CONF:
385 ['neutron-lbaas-agent'],
386 neutron_utils.NEUTRON_OVS_AGENT_CONF:
387 ['neutron-openvswitch-agent'],
388 neutron_utils.NEUTRON_METADATA_AGENT_CONF:
389 ['neutron-metadata-agent'],
390 neutron_utils.NEUTRON_VPNAAS_AGENT_CONF: [
391 'neutron-plugin-vpn-agent',
392 'neutron-vpn-agent'],
393 neutron_utils.NEUTRON_L3_AGENT_CONF: ['neutron-l3-agent',
394 'neutron-vpn-agent'],
395 neutron_utils.NEUTRON_DHCP_AGENT_CONF: ['neutron-dhcp-agent'],
396 neutron_utils.NEUTRON_FWAAS_CONF: ['neutron-l3-agent',
397 'neutron-vpn-agent'],
398 neutron_utils.NEUTRON_METERING_AGENT_CONF:
399 ['neutron-metering-agent'],
400 neutron_utils.NOVA_CONF: ['nova-api-metadata'],
401 neutron_utils.EXT_PORT_CONF: ['ext-port'],
402 neutron_utils.PHY_NIC_MTU_CONF: ['os-charm-phy-nic-mtu'],
403 }
404 self.assertEqual(ex_map, neutron_utils.restart_map())
405
358 def test_restart_map_ovs_odl(self):406 def test_restart_map_ovs_odl(self):
359 self.config.return_value = 'ovs-odl'407 self.config.return_value = 'ovs-odl'
360 self.get_os_codename_install_source.return_value = 'icehouse'408 self.get_os_codename_install_source.return_value = 'icehouse'

Subscribers

People subscribed via source and target branches