From 33e788d17db87e5dfe1f6fffb30e3354901d0f6d Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Wed, 28 Jan 2015 17:22:20 +0100 Subject: [PATCH] [Neutron] start using bridge_uplinks for ovs agent Previously we used to connect iface and bridge for ovs setup like on picture with manually connecting in neutron_ovs_port, but now this should be done by neutron::agents::ml2::ovs with providing bridge_uplinks option. +---------------+ +---------------+ | | | | | | | | | | | | | | | | +---|------|----+ +---|------|----+ +------|-----------/ | | +------------------/ [sw1] [sw2] Change-Id: Ia0eb089d9b3f93d01f3c4a2bbadfe2cf64a06a9c Closes-Bug: rhbz#1177788 (cherry picked from commit b99de0b812c02b4fba8d3428202f1bae000bbcb6) --- packstack/plugins/neutron_350.py | 12 ++++-------- packstack/puppet/templates/neutron_ovs_agent.pp | 1 + packstack/puppet/templates/neutron_ovs_port.pp | 7 ------- 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 packstack/puppet/templates/neutron_ovs_port.pp diff --git a/packstack/plugins/neutron_350.py b/packstack/plugins/neutron_350.py index 95259de01..ca23be177 100644 --- a/packstack/plugins/neutron_350.py +++ b/packstack/plugins/neutron_350.py @@ -757,6 +757,7 @@ def create_l2_agent_manifests(config, messages): # properly formatted by packstack, then consumed by the puppet module. # For example, the input string 'A, B' should formatted as '['A','B']'. config["CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS"] = bm_arr + config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"] = [] elif agent == "linuxbridge": host_var = 'CONFIG_NEUTRON_LB_HOST' template_name = 'neutron_lb_agent' @@ -766,20 +767,15 @@ def create_l2_agent_manifests(config, messages): for host in network_hosts | compute_hosts: manifestfile = "%s_neutron.pp" % (host,) manifestdata = "$cfg_neutron_ovs_host = '%s'\n" % host - manifestdata += getManifestTemplate(template_name) - appendManifestFile(manifestfile, manifestdata + "\n") # neutron ovs port only on network hosts if ( agent == "openvswitch" and ( (host in network_hosts and tunnel_types) or 'vlan' in ovs_type) ): - bridge_key = 'CONFIG_NEUTRON_OVS_BRIDGE' - iface_key = 'CONFIG_NEUTRON_OVS_IFACE' - for if_map in iface_arr: - config[bridge_key], config[iface_key] = if_map.split(':') - manifestdata = getManifestTemplate("neutron_ovs_port") - appendManifestFile(manifestfile, manifestdata + "\n") + config["CONFIG_NEUTRON_OVS_BRIDGE_IFACES"] = iface_arr + manifestdata += getManifestTemplate(template_name) + appendManifestFile(manifestfile, manifestdata + "\n") # Additional configurations required for compute hosts and # network hosts. manifestdata = getManifestTemplate('neutron_bridge_module') diff --git a/packstack/puppet/templates/neutron_ovs_agent.pp b/packstack/puppet/templates/neutron_ovs_agent.pp index 239fd34db..15f4a3547 100644 --- a/packstack/puppet/templates/neutron_ovs_agent.pp +++ b/packstack/puppet/templates/neutron_ovs_agent.pp @@ -8,6 +8,7 @@ if $ovs_agent_vxlan_cfg_neut_ovs_tun_if != '' { } class { 'neutron::agents::ml2::ovs': + bridge_uplinks => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_IFACES'), bridge_mappings => hiera_array('CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS'), enable_tunneling => hiera('CONFIG_NEUTRON_OVS_TUNNELING'), tunnel_types => hiera_array('CONFIG_NEUTRON_OVS_TUNNEL_TYPES'), diff --git a/packstack/puppet/templates/neutron_ovs_port.pp b/packstack/puppet/templates/neutron_ovs_port.pp deleted file mode 100644 index 80015e56c..000000000 --- a/packstack/puppet/templates/neutron_ovs_port.pp +++ /dev/null @@ -1,7 +0,0 @@ -$cfg_neutron_ovs_iface = hiera('CONFIG_NEUTRON_OVS_IFACE') - -vs_port { $cfg_neutron_ovs_iface: - ensure => present, - bridge => hiera('CONFIG_NEUTRON_OVS_BRIDGE'), -} -