Print stack outputs before copying ssh keys
[releng/builder.git] / jjb / opendaylight-infra-copy-ssh-keys.sh
index 30d625f88fed171a8be03aa5b8534b1b5aeb9131..1b0ce6ebd4ed8cc03e882befb38e55af60b2127b 100644 (file)
@@ -1,4 +1,6 @@
 #!/bin/bash
+echo "----------> Copy ssh public keys to csit lab"
+
 source $WORKSPACE/.venv-openstack/bin/activate
 
 function copy-ssh-keys-to-slave() {
@@ -15,9 +17,16 @@ function copy-ssh-keys-to-slave() {
             echo "SSH not responding on ${i}. Retrying in 10 seconds..."
             sleep 10
         fi
+
+        # ping test to see if connectivity is available
+        ping -c1 ${i}
     done
 }
 
+# Print the Stack outputs parameters so that we can identify which IPs belong
+# to which VM types.
+openstack --os-cloud rackspace stack show -c outputs $STACK_NAME
+
 ADDR=(`openstack --os-cloud rackspace stack show -f json -c outputs $STACK_NAME | \
        jq -r '.outputs[] | \
               select(.output_key | match("^vm_[0-9]+_ips\$")) | \