final refactoring
diff --git a/scripts/run_test.sh b/scripts/run_test.sh
index f5e2d27..4745065 100644
--- a/scripts/run_test.sh
+++ b/scripts/run_test.sh
@@ -102,16 +102,17 @@
if [ -z "$list" ]; then
echo "Cannot allocate new floating ip"
- exit
+ # exit
fi
fi
+ echo $FLOATING_NET
export VM_IP=$IP
echo "VM_IP: $VM_IP"
}
function run_openrc() {
- source run_vm.sh "$FUEL_MASTER_IP" "$FUEL_MASTER_PASSWD" "$EXTERNAL_IP"
+ source run_vm.sh "$FUEL_MASTER_IP" "$FUEL_MASTER_PASSWD" "$EXTERNAL_IP" novanetwork nova
source `get_openrc`
list=$(nova list)
@@ -119,13 +120,14 @@
echo "openrc variables are unset or set to the empty string"
fi
- echo 'AUTH_URL: "$OS_AUTH_URL"'
+ echo "AUTH_URL: $OS_AUTH_URL"
}
get_arguments $@
echo "getting openrc from controller node"
run_openrc
+nova list
echo "openrc has been activated on your machine"
get_floating_ip
@@ -149,12 +151,14 @@
# sudo bash ../single_node_test_short.sh $FILE_TO_TEST $RESULT_FILE
-# ssh $SSH_OPTS -i $KEY_FILE_NAME ubuntu@$VM_IP \
-# "cd /tmp/io_scenario; echo 'results' > $RESULT_FILE; \
-# curl -X POST -d @$RESULT_FILE http://http://172.16.52.80/api/test --header 'Content-Type:application/json'"
+ssh $SSH_OPTS -i $KEY_FILE_NAME ubuntu@$VM_IP \
+ "cd /tmp/io_scenario;"
-nova delete $VM_NAME
-wait_vm_deleted
-echo "$VM_NAME has been deleted successfully"
-cinder delete $VOL_ID
-echo "Volume has been deleted $VOL_ID"
+# echo 'results' > $RESULT_FILE; \
+# curl -X POST -d @$RESULT_FILE http://http://172.16.52.80/api/test --header 'Content-Type:application/json'
+
+# nova delete $VM_NAME
+# wait_vm_deleted
+# echo "$VM_NAME has been deleted successfully"
+# cinder delete $VOL_ID
+# echo "Volume has been deleted $VOL_ID"
diff --git a/scripts/run_vm.sh b/scripts/run_vm.sh
index 894e30d..1491f8f 100644
--- a/scripts/run_vm.sh
+++ b/scripts/run_vm.sh
@@ -2,7 +2,9 @@
MASTER_IP=$1
FUEL_PASSWD=$2
NEW_IP=$3
-VM_NAME=disk-io-test2
+FIXED_NET_NAME=$4
+FLOATING_NET=$5
+VM_NAME=disk-io-test
# VM_IP=$(nova floating-ip-create "$FLOATIN_NET" | grep "$FLOATIN_NET" | awk '{print $2}')
VM_IP=172.16.55.23
@@ -11,8 +13,8 @@
-FIXED_NET_NAME="net04"
-FLOATING_NET="net04_ext"
+FIXED_NET_NAME="novanetwork"
+FLOATING_NET="nova"
my_dir="$(dirname -- "$0")"
source "$my_dir/config.sh"
@@ -50,6 +52,9 @@
function boot_vm() {
FIXED_NET_ID=$(nova net-list | grep "\b${FIXED_NET_NAME}\b" | awk '{print $2}')
+ echo "FIXED NET id : $FIXED_NET_ID"
+ sleep 10
+
VOL_ID=$(cinder create --display-name $VOLUME_NAME $VOLUME_SIZE | grep '\bid\b' | grep available | awk '{print $4}')
if [ -z $VOL_ID ]; then
diff --git a/scripts/single_node_test_short.sh b/scripts/single_node_test_short.sh
index 489cd54..e4772e0 100644
--- a/scripts/single_node_test_short.sh
+++ b/scripts/single_node_test_short.sh
@@ -15,7 +15,7 @@
# }
function run_tests(){
- OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G"
+ OPTS="--test-file $TEST_FILE --type fio --iodepth 1 --iosize 10G --timeout 60"
sync ; echo 3 > /proc/sys/vm/drop_caches ; python io.py $OPTS -a randwrite --blocksize 4k -d --concurrency 1