The time that the jumpbox takes can be different every time that is
created so waiting for a specific state can help during the creation.
Signed-off-by: Victor Morales <v.morales@samsung.com>
Change-Id: Idee038556bc669594660a308e405e79fe13ba118
# Create jumphost VM
create_jump() {
./create_vm.sh "$VM_NAME"
- sleep 30
+ jumpbox_ip=$(get_vm_ip)
+ i=0
+ while [ -z $jumpbox_ip ]; do
+ sleep $((++i))
+ jumpbox_ip=$(get_vm_ip)
+ done
+ i=0
+ until nc -w5 -z $jumpbox_ip 22; do
+ sleep $((++i))
+ done
}
# Get jumphost VM IP