ironic scripts should support $Q_USE_NAMESPACE
add logic for ironic to support $Q_USE_NAMESPACE, if it is false, will not call 'ip netns' with network namespace Change-Id: Idc4dfb49ee478486476973a41b420b9b7e11a4e0
This commit is contained in:
parent
fe2f986816
commit
7b5c4e6797
@ -455,7 +455,11 @@ function create_ovs_taps {
|
|||||||
# intentional sleep to make sure the tag has been set to port
|
# intentional sleep to make sure the tag has been set to port
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
||||||
local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-)
|
if [[ "$Q_USE_NAMESPACE" = "True" ]]; then
|
||||||
|
local tapdev=$(sudo ip netns exec qdhcp-${ironic_net_id} ip link list | grep " tap" | cut -d':' -f2 | cut -b2-)
|
||||||
|
else
|
||||||
|
local tapdev=$(sudo ip link list | grep " tap" | cut -d':' -f2 | cut -b2-)
|
||||||
|
fi
|
||||||
local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
|
local tag_id=$(sudo ovs-vsctl show |grep ${tapdev} -A1 -m1 | grep tag | cut -d':' -f2 | cut -b2-)
|
||||||
|
|
||||||
# make sure veth pair is not existing, otherwise delete its links
|
# make sure veth pair is not existing, otherwise delete its links
|
||||||
|
Loading…
Reference in New Issue
Block a user