Add --may-exist to l3_agent recipe
when external_network_bridge is not empty, and has been created in formal deployment operation, at this time the external_network_interface should has been added to the external_network_bridge, so if we run a update operation on l3 agent recipe, it will try to add the interface to the bridge again, that will return an error, add --may-exist to avoid it. Change-Id: I40dabc862ae12dc4be81b196987b692a34c0c6c9 Partial-Bug: 1483994
This commit is contained in:
parent
0d54b42ea9
commit
77cdac6a0d
|
@ -127,7 +127,7 @@ when 'OVSInterfaceDriver'
|
|||
not_if "ovs-vsctl br-exists #{ext_bridge}"
|
||||
end
|
||||
execute 'enable external_network_bridge_interface' do
|
||||
command "ip link set #{ext_bridge_iface} up && ovs-vsctl add-port #{ext_bridge} #{ext_bridge_iface}"
|
||||
command "ip link set #{ext_bridge_iface} up && ovs-vsctl --may-exist add-port #{ext_bridge} #{ext_bridge_iface}"
|
||||
only_if "ip link show #{ext_bridge_iface}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -168,7 +168,7 @@ describe 'openstack-network::l3_agent' do
|
|||
|
||||
describe 'create ovs bridges' do
|
||||
let(:cmd) { 'ovs-vsctl add-br br-ex' }
|
||||
let(:iplink) { 'ip link set eth1 up && ovs-vsctl add-port br-ex eth1' }
|
||||
let(:iplink) { 'ip link set eth1 up && ovs-vsctl --may-exist add-port br-ex eth1' }
|
||||
|
||||
it 'does not add the external bridge and disable external_network_bridge_interface if external_network_bridge is empty' do
|
||||
node.set['openstack']['network']['l3']['external_network_bridge'] = ''
|
||||
|
|
Loading…
Reference in New Issue