Merge "Add netconf scale job to find max devices"
[releng/builder.git] / jjb / opendaylight-infra-copy-ssh-keys.sh
index cce9296371d1d054be7425e656f7d0a872b3902a..493f776b7549cda38814220fa9dfcf1ab70c63b6 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -11,9 +11,6 @@
 
 echo "----------> Copy ssh public keys to csit lab"
 
-# shellcheck source=/tmp/v/openstack/bin/activate disable=SC1091
-source "/tmp/v/openstack/bin/activate"
-
 function copy-ssh-keys-to-slave() {
     RETRIES=60
     for j in $(seq 1 $RETRIES); do
@@ -24,6 +21,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..."