Merge "Use an ovs port on the overcloud test network"
This commit is contained in:
@@ -40,11 +40,6 @@ echo "Setting up $NUMENVS test environments"
|
||||
export PATH=/opt/stack/tripleo-incubator/scripts/:$PATH
|
||||
|
||||
OVSBRIDGE=$(os-apply-config --key neutron.ovs.physical_bridge --type netdevice)
|
||||
# Create a dummy device on the public bridge, this will have an IP on the overcloud
|
||||
# TODO : make this persist across reboots
|
||||
DUMMYDEVICE=tedev
|
||||
ip link add $DUMMYDEVICE type dummy
|
||||
ensure-bridge $OVSBRIDGE $DUMMYDEVICE
|
||||
|
||||
# Place the physical interface onto the seed bridge
|
||||
ensure-bridge $OVSBRIDGE \
|
||||
@@ -64,12 +59,18 @@ export OS_USERNAME=$(os-apply-config --key gearman-worker.auth_user --type raw)
|
||||
export OS_TENANT_NAME=$(os-apply-config --key gearman-worker.auth_tenant --type raw)
|
||||
|
||||
# Give this host an IP on tripleo-bm-test
|
||||
# Create a internal port on the public bridge, this will have an IP on the overcloud
|
||||
DUMMYDEVICE=tedev
|
||||
ovs-vsctl add-port $OVSBRIDGE $DUMMYDEVICE -- set Interface $DUMMYDEVICE type=internal
|
||||
MAC=$(ip link show ${DUMMYDEVICE} | awk 'NR==2 {print $2}')
|
||||
NETWORKNAME=$(os-apply-config --key gearman-worker.network_name --type netdevice)
|
||||
PORTOUTPUT=$(neutron port-create --name te_$(hostname) --mac-address $MAC --format shell --column fixed_ips $NETWORKNAME)
|
||||
echo "$PORTOUTPUT"
|
||||
export HOSTIP=$(echo "$PORTOUTPUT" | grep -E -o "([0-9]+\.){3}[0-9]+")
|
||||
|
||||
# TODO : make this persist across reboots
|
||||
# TODO : Get prefix length
|
||||
ip link set up dev $DUMMYDEVICE
|
||||
ip addr add $HOSTIP/24 dev $DUMMYDEVICE
|
||||
|
||||
killall -9 testenv-worker || true
|
||||
|
||||
Reference in New Issue
Block a user