From 86d6d5c7f226caea590256bad3493549690c26e7 Mon Sep 17 00:00:00 2001 From: Ryota MIBU Date: Tue, 26 Jul 2016 14:49:18 +0900 Subject: fix doctor test - revert to use nova command to get IP address of compute host - disable interface which has the IP address of target compute host JIRA: DOCTOR-63 Change-Id: Ic5dc7706476a542f13a942fdae5b347ce28d3f72 Signed-off-by: Ryota MIBU --- tests/run.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/run.sh b/tests/run.sh index e2ae595d..767a726a 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -55,7 +55,7 @@ get_compute_host_info() { fi COMPUTE_IP=$(sudo ssh $ssh_opts $INSTALLER_IP \ "source stackrc; \ - openstack server show $COMPUTE_HOST \ + nova show $COMPUTE_HOST \ | awk '/ ctlplane network /{print \$5}'") elif [[ "$INSTALLER_TYPE" == "local" ]] ; then COMPUTE_USER=${COMPUTE_USER:-$(whoami)} @@ -215,13 +215,14 @@ inject_failure() { echo "disabling network of compute host [$COMPUTE_HOST] for 3 mins..." cat > disable_network.sh << 'END_TXT' #!/bin/bash -x -dev=$(sudo ip route | awk '/^default/{print $5}') +dev=$(sudo ip a | awk '/ @COMPUTE_IP@\//{print $7}') sleep 1 sudo ip link set $dev down sleep 180 sudo ip link set $dev up sleep 1 END_TXT + sed -i -e "s/@COMPUTE_IP@/$COMPUTE_IP/" disable_network.sh chmod +x disable_network.sh scp $ssh_opts_cpu disable_network.sh "$COMPUTE_USER@$COMPUTE_IP:" ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" 'nohup ./disable_network.sh > disable_network.log 2>&1 &' -- cgit 1.2.3-korg