Dump server console logs on failure
[releng/builder.git] / jjb / opendaylight-infra-copy-ssh-keys.sh
index cce9296371d1d054be7425e656f7d0a872b3902a..1bf889d7078cc1b56055dc0b604838db7d460e32 100644 (file)
@@ -24,6 +24,11 @@ function copy-ssh-keys-to-slave() {
             break
         elif [ "$j" -eq $RETRIES ]; then
             echo "SSH not responding on ${i} after $RETIRES tries. Giving up."
+
+            server=$(openstack port list -f value -c device_id --fixed-ip ip-address="${i}")
+            echo "Dumping console logs for $server ${i}"
+            openstack console log show "$server"
+
             exit 1
         else
             echo "SSH not responding on ${i}. Retrying in 10 seconds..."