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':