summaryrefslogtreecommitdiffstats
path: root/tests/run.sh
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-07-26 14:49:18 +0900
committerRyota MIBU <r-mibu@cq.jp.nec.com>2016-07-26 14:50:32 +0900
commit86d6d5c7f226caea590256bad3493549690c26e7 (patch)
tree923e15347fbe8077c6c03fdeb1d0114d19d69c28 /tests/run.sh
parent8ac6d9d2da1ba1f041b6191d89cedd0360be3f4e (diff)
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 <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'tests/run.sh')
-rwxr-xr-xtests/run.sh5
1 files changed, 3 insertions, 2 deletions
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 &'