From 2497373cc78bafbde9b36a986ddeaf7fe31fbb8c Mon Sep 17 00:00:00 2001 From: Martin Magr Date: Tue, 15 Jul 2014 17:03:58 +0200 Subject: [PATCH] Don't use ML2 parameters for other plugins CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS parameter must not be used when monolithic Neutron plugins are being installed. This patch is fixing installation failures for OVS and LB plugins. Fixed Gerrit default branch for icehouse branch Change-Id: Id6e7cdf2ab46a024fb78f74c77cff8f847ada038 Fixes: rhbz#1119473 (cherry picked from commit ec5cf0ef5cc575b72db4477f3113957f8f6b4906) --- .gitreview | 1 + packstack/plugins/neutron_350.py | 9 +++++++++ packstack/puppet/templates/neutron_ovs_agent_gre.pp | 7 +------ packstack/puppet/templates/neutron_ovs_agent_local.pp | 7 +------ packstack/puppet/templates/neutron_ovs_agent_vlan.pp | 7 +------ packstack/puppet/templates/neutron_ovs_agent_vxlan.pp | 7 +------ 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.gitreview b/.gitreview index 0a64477e8..376973c61 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=review.openstack.org port=29418 project=stackforge/packstack.git +defaultbranch=icehouse diff --git a/packstack/plugins/neutron_350.py b/packstack/plugins/neutron_350.py index e9c7fceec..ea22460d8 100644 --- a/packstack/plugins/neutron_350.py +++ b/packstack/plugins/neutron_350.py @@ -881,6 +881,15 @@ def create_l2_agent_manifests(config, messages): plugin = config['CONFIG_NEUTRON_L2_PLUGIN'] agent = config["CONFIG_NEUTRON_L2_AGENT"] + # CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS will be available only for ML2 + # plugin deployment, but we need CONFIG_NEUTRON_USE_L2POPULATION also + # for other plugin template generation + if ('l2population' in + config.get('CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS', [])): + config['CONFIG_NEUTRON_USE_L2POPULATION'] = 'true' + else: + config['CONFIG_NEUTRON_USE_L2POPULATION'] = 'false' + if agent == "openvswitch": host_var = 'CONFIG_NEUTRON_OVS_HOST' if plugin == agent: diff --git a/packstack/puppet/templates/neutron_ovs_agent_gre.pp b/packstack/puppet/templates/neutron_ovs_agent_gre.pp index 84aad09ea..fd39ef742 100644 --- a/packstack/puppet/templates/neutron_ovs_agent_gre.pp +++ b/packstack/puppet/templates/neutron_ovs_agent_gre.pp @@ -6,17 +6,12 @@ if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" { } if '%(CONFIG_NEUTRON_L2_PLUGIN)s' == 'ml2' { - if ('l2population' in %(CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS)s) { - $l2population = true - } else { - $l2population = false - } class { 'neutron::agents::ml2::ovs': bridge_mappings => %(CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS)s, enable_tunneling => true, tunnel_types => ['gre'], local_ip => $localip, - l2_population => $l2population, + l2_population => %(CONFIG_NEUTRON_USE_L2POPULATION)s, } } else { class { 'neutron::agents::ovs': diff --git a/packstack/puppet/templates/neutron_ovs_agent_local.pp b/packstack/puppet/templates/neutron_ovs_agent_local.pp index b16373f99..371a2c82c 100644 --- a/packstack/puppet/templates/neutron_ovs_agent_local.pp +++ b/packstack/puppet/templates/neutron_ovs_agent_local.pp @@ -1,13 +1,8 @@ if '%(CONFIG_NEUTRON_L2_PLUGIN)s' == 'ml2' { - if ('l2population' in %(CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS)s) { - $l2population = true - } else { - $l2population = false - } class { 'neutron::agents::ml2::ovs': bridge_mappings => %(CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS)s, - l2_population => $l2population, + l2_population => %(CONFIG_NEUTRON_USE_L2POPULATION)s, } } else { class { 'neutron::agents::ovs': diff --git a/packstack/puppet/templates/neutron_ovs_agent_vlan.pp b/packstack/puppet/templates/neutron_ovs_agent_vlan.pp index b16373f99..371a2c82c 100644 --- a/packstack/puppet/templates/neutron_ovs_agent_vlan.pp +++ b/packstack/puppet/templates/neutron_ovs_agent_vlan.pp @@ -1,13 +1,8 @@ if '%(CONFIG_NEUTRON_L2_PLUGIN)s' == 'ml2' { - if ('l2population' in %(CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS)s) { - $l2population = true - } else { - $l2population = false - } class { 'neutron::agents::ml2::ovs': bridge_mappings => %(CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS)s, - l2_population => $l2population, + l2_population => %(CONFIG_NEUTRON_USE_L2POPULATION)s, } } else { class { 'neutron::agents::ovs': diff --git a/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp b/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp index 2e2916106..afa38eb1a 100644 --- a/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp +++ b/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp @@ -7,18 +7,13 @@ if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" { } if '%(CONFIG_NEUTRON_L2_PLUGIN)s' == 'ml2' { - if ('l2population' in %(CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS)s) { - $l2population = true - } else { - $l2population = false - } class { 'neutron::agents::ml2::ovs': bridge_mappings => %(CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS)s, enable_tunneling => true, tunnel_types => ['vxlan'], local_ip => $localip, vxlan_udp_port => %(CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT)s, - l2_population => $l2population, + l2_population => %(CONFIG_NEUTRON_USE_L2POPULATION)s, } } else { class { 'neutron::agents::ovs':