Neutron: ensure l2population is not enable in l3_ha mode
l3_ha is not compatible with l2population mechanism driver. Source: http://assafmuller.com/2014/12/30/juno-advanced-routing-compatibility/ Change-Id: I028aa96393f29029a8b4462e9675e0170b348ec3
This commit is contained in:
parent
bda9e8775f
commit
39f6007a84
@ -150,6 +150,12 @@
|
|||||||
# List of colon-separated id ranges
|
# List of colon-separated id ranges
|
||||||
# Defautls to ['1:10000']
|
# Defautls to ['1:10000']
|
||||||
#
|
#
|
||||||
|
# [*mechanism_drivers*]
|
||||||
|
# (optional) Neutron mechanism drivers to run
|
||||||
|
# List of drivers.
|
||||||
|
# Note: if l3-ha is True, do not include l2population (not compatible in Juno).
|
||||||
|
# Defaults to ['linuxbridge', 'openvswitch','l2population']
|
||||||
|
#
|
||||||
class cloud::network::controller(
|
class cloud::network::controller(
|
||||||
$neutron_db_host = '127.0.0.1',
|
$neutron_db_host = '127.0.0.1',
|
||||||
$neutron_db_user = 'neutron',
|
$neutron_db_user = 'neutron',
|
||||||
@ -174,6 +180,7 @@ class cloud::network::controller(
|
|||||||
$type_drivers = ['gre', 'vlan', 'flat'],
|
$type_drivers = ['gre', 'vlan', 'flat'],
|
||||||
$provider_vlan_ranges = ['physnet1:1000:2999'],
|
$provider_vlan_ranges = ['physnet1:1000:2999'],
|
||||||
$plugin = 'ml2',
|
$plugin = 'ml2',
|
||||||
|
$mechanism_drivers = ['linuxbridge', 'openvswitch','l2population'],
|
||||||
$l3_ha = false,
|
$l3_ha = false,
|
||||||
$router_distributed = false,
|
$router_distributed = false,
|
||||||
# only needed by cisco n1kv plugin
|
# only needed by cisco n1kv plugin
|
||||||
@ -194,6 +201,11 @@ class cloud::network::controller(
|
|||||||
fail 'l3_ha and router_distributed are mutually exclusive, only one of them can be set to true'
|
fail 'l3_ha and router_distributed are mutually exclusive, only one of them can be set to true'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validate_array($mechanism_drivers)
|
||||||
|
if $l3_ha and member($mechanism_drivers, 'l2population') {
|
||||||
|
fail 'l3_ha does not work with l2population mechanism driver in Juno.'
|
||||||
|
}
|
||||||
|
|
||||||
class { 'neutron::server':
|
class { 'neutron::server':
|
||||||
auth_password => $ks_neutron_password,
|
auth_password => $ks_neutron_password,
|
||||||
auth_host => $ks_keystone_admin_host,
|
auth_host => $ks_keystone_admin_host,
|
||||||
@ -217,7 +229,7 @@ class cloud::network::controller(
|
|||||||
tunnel_id_ranges => $tunnel_id_ranges,
|
tunnel_id_ranges => $tunnel_id_ranges,
|
||||||
vni_ranges => $vni_ranges,
|
vni_ranges => $vni_ranges,
|
||||||
flat_networks => $flat_networks,
|
flat_networks => $flat_networks,
|
||||||
mechanism_drivers => ['linuxbridge', 'openvswitch','l2population'],
|
mechanism_drivers => $mechanism_drivers,
|
||||||
enable_security_group => true
|
enable_security_group => true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,8 @@ describe 'cloud::network::controller' do
|
|||||||
|
|
||||||
context 'with L3 HA' do
|
context 'with L3 HA' do
|
||||||
before :each do
|
before :each do
|
||||||
params.merge!(:l3_ha => true)
|
params.merge!(:l3_ha => true,
|
||||||
|
:mechanism_drivers => ['openvswitch'])
|
||||||
end
|
end
|
||||||
it 'should configure L3 HA' do
|
it 'should configure L3 HA' do
|
||||||
is_expected.to contain_class('neutron::server').with(
|
is_expected.to contain_class('neutron::server').with(
|
||||||
@ -217,6 +218,14 @@ describe 'cloud::network::controller' do
|
|||||||
end
|
end
|
||||||
it_raises 'a Puppet::Error', /l3_ha and router_distributed are mutually exclusive, only one of them can be set to true/
|
it_raises 'a Puppet::Error', /l3_ha and router_distributed are mutually exclusive, only one of them can be set to true/
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with L3 HA and l2population enabled' do
|
||||||
|
before :each do
|
||||||
|
params.merge!(:l3_ha => true,
|
||||||
|
:mechanism_drivers => ['openvswitch', 'l2population'])
|
||||||
|
end
|
||||||
|
it_raises 'a Puppet::Error', /l3_ha does not work with l2population mechanism driver in Juno./
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'on Debian platforms' do
|
context 'on Debian platforms' do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user