-#!/bin/bash
+#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
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
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..."