Update for changes in neutron mitaka b2 packaging.
This commit is contained in:
commit
4eb5404af9
@ -102,6 +102,8 @@ NEUTRON_OVS_PLUGIN_CONF = \
|
|||||||
"/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
|
"/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"
|
||||||
NEUTRON_ML2_PLUGIN_CONF = \
|
NEUTRON_ML2_PLUGIN_CONF = \
|
||||||
"/etc/neutron/plugins/ml2/ml2_conf.ini"
|
"/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||||
|
NEUTRON_OVS_AGENT_CONF = \
|
||||||
|
"/etc/neutron/plugins/ml2/openvswitch_agent.ini"
|
||||||
NEUTRON_NVP_PLUGIN_CONF = \
|
NEUTRON_NVP_PLUGIN_CONF = \
|
||||||
"/etc/neutron/plugins/nicira/nvp.ini"
|
"/etc/neutron/plugins/nicira/nvp.ini"
|
||||||
NEUTRON_NSX_PLUGIN_CONF = \
|
NEUTRON_NSX_PLUGIN_CONF = \
|
||||||
@ -279,6 +281,10 @@ def get_packages():
|
|||||||
# Switch out to actual metering agent package
|
# Switch out to actual metering agent package
|
||||||
packages.remove('neutron-plugin-metering-agent')
|
packages.remove('neutron-plugin-metering-agent')
|
||||||
packages.append('neutron-metering-agent')
|
packages.append('neutron-metering-agent')
|
||||||
|
if source >= 'mitaka':
|
||||||
|
# Switch out to actual ovs agent package
|
||||||
|
packages.remove('neutron-plugin-openvswitch-agent')
|
||||||
|
packages.append('neutron-openvswitch-agent')
|
||||||
packages.extend(determine_l3ha_packages())
|
packages.extend(determine_l3ha_packages())
|
||||||
|
|
||||||
if git_install_requested():
|
if git_install_requested():
|
||||||
@ -452,6 +458,10 @@ NEUTRON_OVS_CONFIG_FILES = {
|
|||||||
'hook_contexts': [NeutronGatewayContext()],
|
'hook_contexts': [NeutronGatewayContext()],
|
||||||
'services': ['neutron-plugin-openvswitch-agent']
|
'services': ['neutron-plugin-openvswitch-agent']
|
||||||
},
|
},
|
||||||
|
NEUTRON_OVS_AGENT_CONF: {
|
||||||
|
'hook_contexts': [NeutronGatewayContext()],
|
||||||
|
'services': ['neutron-openvswitch-agent']
|
||||||
|
},
|
||||||
EXT_PORT_CONF: {
|
EXT_PORT_CONF: {
|
||||||
'hook_contexts': [ExternalPortContext()],
|
'hook_contexts': [ExternalPortContext()],
|
||||||
'services': ['ext-port']
|
'services': ['ext-port']
|
||||||
@ -567,7 +577,12 @@ CONFIG_FILES = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
SERVICE_RENAMES = {}
|
SERVICE_RENAMES = {
|
||||||
|
'mitaka': {
|
||||||
|
'neutron-plugin-openvswitch-agent': 'neutron-openvswitch-agent',
|
||||||
|
'neutron-plugin-metering-agent': 'neutron-metering-agent',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def remap_service(service_name):
|
def remap_service(service_name):
|
||||||
@ -599,10 +614,16 @@ def resolve_config_files(name, plugin, release):
|
|||||||
config_files = deepcopy(CONFIG_FILES)
|
config_files = deepcopy(CONFIG_FILES)
|
||||||
if plugin == 'ovs':
|
if plugin == 'ovs':
|
||||||
# NOTE: deal with switch to ML2 plugin for >= icehouse
|
# NOTE: deal with switch to ML2 plugin for >= icehouse
|
||||||
drop_config = [NEUTRON_ML2_PLUGIN_CONF]
|
drop_config = [NEUTRON_ML2_PLUGIN_CONF,
|
||||||
|
NEUTRON_OVS_AGENT_CONF]
|
||||||
if release >= 'icehouse':
|
if release >= 'icehouse':
|
||||||
# ovs -> ml2
|
# ovs -> ml2
|
||||||
drop_config = [NEUTRON_OVS_PLUGIN_CONF]
|
drop_config = [NEUTRON_OVS_PLUGIN_CONF,
|
||||||
|
NEUTRON_OVS_AGENT_CONF]
|
||||||
|
if release >= 'mitaka':
|
||||||
|
# ml2 -> ovs_agent
|
||||||
|
drop_config = [NEUTRON_OVS_PLUGIN_CONF,
|
||||||
|
NEUTRON_ML2_PLUGIN_CONF]
|
||||||
|
|
||||||
for _config in drop_config:
|
for _config in drop_config:
|
||||||
if _config in config_files[name][plugin]:
|
if _config in config_files[name][plugin]:
|
||||||
@ -637,11 +658,14 @@ def register_configs():
|
|||||||
|
|
||||||
|
|
||||||
def stop_services():
|
def stop_services():
|
||||||
|
release = get_os_codename_install_source(config('openstack-origin'))
|
||||||
|
plugin = remap_plugin(config('plugin'))
|
||||||
name = networking_name()
|
name = networking_name()
|
||||||
|
config_files = resolve_config_files(name, plugin, release)
|
||||||
svcs = set()
|
svcs = set()
|
||||||
for ctxt in CONFIG_FILES[name][config('plugin')].itervalues():
|
for ctxt in config_files[name][config('plugin')].itervalues():
|
||||||
for svc in ctxt['services']:
|
for svc in ctxt['services']:
|
||||||
svcs.add(svc)
|
svcs.add(remap_service(svc))
|
||||||
for svc in svcs:
|
for svc in svcs:
|
||||||
service_stop(svc)
|
service_stop(svc)
|
||||||
|
|
||||||
|
20
templates/mitaka/openvswitch_agent.ini
Normal file
20
templates/mitaka/openvswitch_agent.ini
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# mitaka
|
||||||
|
###############################################################################
|
||||||
|
# [ WARNING ]
|
||||||
|
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||||
|
###############################################################################
|
||||||
|
[ovs]
|
||||||
|
enable_tunneling = True
|
||||||
|
local_ip = {{ local_ip }}
|
||||||
|
bridge_mappings = {{ bridge_mappings }}
|
||||||
|
|
||||||
|
[agent]
|
||||||
|
tunnel_types = {{ overlay_network_type }}
|
||||||
|
l2_population = {{ l2_population }}
|
||||||
|
enable_distributed_routing = {{ enable_dvr }}
|
||||||
|
{% if veth_mtu -%}
|
||||||
|
veth_mtu = {{ veth_mtu }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
[securitygroup]
|
||||||
|
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
|
0
tests/019-basic-trusty-mitaka
Executable file → Normal file
0
tests/019-basic-trusty-mitaka
Executable file → Normal file
@ -185,6 +185,10 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment):
|
|||||||
|
|
||||||
if self._get_openstack_release() <= self.trusty_juno:
|
if self._get_openstack_release() <= self.trusty_juno:
|
||||||
neutron_services.append('neutron-vpn-agent')
|
neutron_services.append('neutron-vpn-agent')
|
||||||
|
if self._get_openstack_release() >= self.trusty_mitaka:
|
||||||
|
# neutron-plugin-openvswitch-agent -> neutron-openvswitch-agent
|
||||||
|
neutron_services.remove('neutron-plugin-openvswitch-agent')
|
||||||
|
neutron_services.append('neutron-openvswitch-agent')
|
||||||
|
|
||||||
nova_cc_services = ['nova-api-ec2',
|
nova_cc_services = ['nova-api-ec2',
|
||||||
'nova-api-os-compute',
|
'nova-api-os-compute',
|
||||||
|
@ -169,6 +169,19 @@ class TestQuantumUtils(CharmTestCase):
|
|||||||
self.assertFalse('python-mysqldb' in packages)
|
self.assertFalse('python-mysqldb' in packages)
|
||||||
self.assertTrue('python-pymysql' in packages)
|
self.assertTrue('python-pymysql' in packages)
|
||||||
|
|
||||||
|
@patch.object(neutron_utils, 'git_install_requested')
|
||||||
|
def test_get_packages_ovs_mitaka(self, git_requested):
|
||||||
|
git_requested.return_value = False
|
||||||
|
self.config.return_value = 'ovs'
|
||||||
|
self.get_os_codename_install_source.return_value = 'mitaka'
|
||||||
|
packages = neutron_utils.get_packages()
|
||||||
|
self.assertTrue('neutron-metering-agent' in packages)
|
||||||
|
self.assertFalse('neutron-plugin-metering-agent' in packages)
|
||||||
|
self.assertTrue('neutron-openvswitch-agent' in packages)
|
||||||
|
self.assertFalse('neutron-plugin-openvswitch-agent' in packages)
|
||||||
|
self.assertFalse('python-mysqldb' in packages)
|
||||||
|
self.assertTrue('python-pymysql' in packages)
|
||||||
|
|
||||||
@patch.object(neutron_utils, 'git_install_requested')
|
@patch.object(neutron_utils, 'git_install_requested')
|
||||||
def test_get_packages_l3ha(self, git_requested):
|
def test_get_packages_l3ha(self, git_requested):
|
||||||
git_requested.return_value = False
|
git_requested.return_value = False
|
||||||
@ -355,6 +368,41 @@ class TestQuantumUtils(CharmTestCase):
|
|||||||
|
|
||||||
self.assertDictEqual(neutron_utils.restart_map(), ex_map)
|
self.assertDictEqual(neutron_utils.restart_map(), ex_map)
|
||||||
|
|
||||||
|
def test_restart_map_ovs_mitaka(self):
|
||||||
|
self.config.return_value = 'ovs'
|
||||||
|
self.get_os_codename_install_source.return_value = 'mitaka'
|
||||||
|
ex_map = {
|
||||||
|
neutron_utils.NEUTRON_CONF: ['neutron-l3-agent',
|
||||||
|
'neutron-dhcp-agent',
|
||||||
|
'neutron-metadata-agent',
|
||||||
|
'neutron-openvswitch-agent',
|
||||||
|
'neutron-metering-agent',
|
||||||
|
'neutron-lbaas-agent',
|
||||||
|
'neutron-plugin-vpn-agent',
|
||||||
|
'neutron-vpn-agent'],
|
||||||
|
neutron_utils.NEUTRON_DNSMASQ_CONF: ['neutron-dhcp-agent'],
|
||||||
|
neutron_utils.NEUTRON_LBAAS_AGENT_CONF:
|
||||||
|
['neutron-lbaas-agent'],
|
||||||
|
neutron_utils.NEUTRON_OVS_AGENT_CONF:
|
||||||
|
['neutron-openvswitch-agent'],
|
||||||
|
neutron_utils.NEUTRON_METADATA_AGENT_CONF:
|
||||||
|
['neutron-metadata-agent'],
|
||||||
|
neutron_utils.NEUTRON_VPNAAS_AGENT_CONF: [
|
||||||
|
'neutron-plugin-vpn-agent',
|
||||||
|
'neutron-vpn-agent'],
|
||||||
|
neutron_utils.NEUTRON_L3_AGENT_CONF: ['neutron-l3-agent',
|
||||||
|
'neutron-vpn-agent'],
|
||||||
|
neutron_utils.NEUTRON_DHCP_AGENT_CONF: ['neutron-dhcp-agent'],
|
||||||
|
neutron_utils.NEUTRON_FWAAS_CONF: ['neutron-l3-agent',
|
||||||
|
'neutron-vpn-agent'],
|
||||||
|
neutron_utils.NEUTRON_METERING_AGENT_CONF:
|
||||||
|
['neutron-metering-agent'],
|
||||||
|
neutron_utils.NOVA_CONF: ['nova-api-metadata'],
|
||||||
|
neutron_utils.EXT_PORT_CONF: ['ext-port'],
|
||||||
|
neutron_utils.PHY_NIC_MTU_CONF: ['os-charm-phy-nic-mtu'],
|
||||||
|
}
|
||||||
|
self.assertEqual(ex_map, neutron_utils.restart_map())
|
||||||
|
|
||||||
def test_restart_map_ovs_odl(self):
|
def test_restart_map_ovs_odl(self):
|
||||||
self.config.return_value = 'ovs-odl'
|
self.config.return_value = 'ovs-odl'
|
||||||
self.get_os_codename_install_source.return_value = 'icehouse'
|
self.get_os_codename_install_source.return_value = 'icehouse'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user