summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrevert_instance_from_snapshot.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/revert_instance_from_snapshot.sh b/revert_instance_from_snapshot.sh
index b2a196f..ae003ee 100755
--- a/revert_instance_from_snapshot.sh
+++ b/revert_instance_from_snapshot.sh
@@ -80,6 +80,8 @@ do
nova floating-ip-create > /dev/null
done
+
+
echo
echo "Deleting $instance"
nova delete $instance
@@ -97,7 +99,12 @@ echo $result
newid=`echo "$result" | grep '| id ' | cut -d '|' -f 3 | sed 's/ //g' `
echo
-echo "New ID for instance $instance: $newid"
+echo "New ID for instance $instance: $newid, sleeping 5s so fixed IP shows up for instance"
+echo
+
+# todo: check every sec for fixed ip to show up
+# https://leap.se/code/issues/3743
+sleep 5
for ip in $float_ips
do
@@ -105,6 +112,7 @@ do
nova add-floating-ip $newid $ip
done
+
nova list
echo