diff options
author | Tim Rozet <trozet@redhat.com> | 2017-02-13 16:30:01 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2017-02-13 16:30:01 -0500 |
commit | 4327934d160a3d289b3732ea1d92453707bbe261 (patch) | |
tree | b5a4d0d543d5655931076f187d5a68d5986c9fc0 /jjb/apex/apex-snapshot-deploy.sh | |
parent | cf765e23b68791c2b66cdf9fa51ba0bf5f25fbe5 (diff) |
CSIT: Fixes bug with routes and compute nodes
Change-Id: I2b5625ce9458ff4438ffc556bb08c4d6a6ace03d
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex/apex-snapshot-deploy.sh')
-rw-r--r-- | jjb/apex/apex-snapshot-deploy.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/jjb/apex/apex-snapshot-deploy.sh b/jjb/apex/apex-snapshot-deploy.sh index dcae0c14d..8274740c8 100644 --- a/jjb/apex/apex-snapshot-deploy.sh +++ b/jjb/apex/apex-snapshot-deploy.sh @@ -81,6 +81,12 @@ if [ -z "$virsh_networks" ]; then exit 1 fi +echo "Checking overcloudrc" +if ! stat overcloudrc; then + echo "ERROR: overcloudrc does not exist in snap unpack" + exit 1 +fi + for network_def in ${virsh_networks}; do sudo virsh net-create ${network_def} network=$(echo ${network_def} | awk -F '.' '{print $1}') @@ -99,12 +105,16 @@ for network_def in ${virsh_networks}; do echo "Configuring IP 192.168.37.1 on br-external" sudo ip addr add 192.168.37.1/24 dev br-external sudo ip link set up dev br-external - # Route for admin network + # Routes for admin network # The overcloud controller is multi-homed and will fail to respond # to traffic from the functest container due to reverse-path-filtering # This route allows reverse traffic, by forcing admin network destined - # traffic through the external network - sudo ip route add 192.0.2.0/25 dev br-external + # traffic through the external network for controller IPs only. + # Compute nodes have no ip on external interfaces. + controller_ips=$(cat overcloudrc | grep -Eo "192.0.2.[0-9]+") + for ip in $controller_ips; do + sudo ip route add ${ip}/32 dev br-external + done fi fi done @@ -126,17 +136,11 @@ for node_def in ${virsh_vm_defs}; do echo "Node: ${node} started" done -echo "Checking overcloudrc" -if ! stat overcloudrc; then - echo "ERROR: overcloudrc does not exist in snap unpack" - exit 1 -fi - # copy overcloudrc for functest mkdir -p $HOME/cloner-info cp -f overcloudrc $HOME/cloner-info/ -admin_controller_ip=$(cat overcloudrc | grep -Eo "192.0.2.[0-9]+") +admin_controller_ip=$(cat overcloudrc | grep -Eo -m 1 "192.0.2.[0-9]+") netvirt_url="http://${admin_controller_ip}:8081/restconf/operational/network-topology:network-topology/topology/netvirt:1" source overcloudrc |