X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fopendaylight-infra-copy-ssh-keys.sh;h=1bf889d7078cc1b56055dc0b604838db7d460e32;hb=4e0bc025e2916fcea4ba7896f0e5a0957dbeaac9;hp=daa33c3db1d49864e63dc9c3d568ee5957af2593;hpb=c73635492b51ba57b05293550b70523987a5d809;p=releng%2Fbuilder.git diff --git a/jjb/opendaylight-infra-copy-ssh-keys.sh b/jjb/opendaylight-infra-copy-ssh-keys.sh index daa33c3db..1bf889d70 100644 --- a/jjb/opendaylight-infra-copy-ssh-keys.sh +++ b/jjb/opendaylight-infra-copy-ssh-keys.sh @@ -17,13 +17,18 @@ source "/tmp/v/openstack/bin/activate" function copy-ssh-keys-to-slave() { RETRIES=60 for j in $(seq 1 $RETRIES); do - # shellcheck disable=SC2092 + # shellcheck disable=SC2006,SC2092 if `ssh-copy-id -i /home/jenkins/.ssh/id_rsa.pub "jenkins@${i}" > /dev/null 2>&1`; then ssh "jenkins@${i}" 'echo "$(facter ipaddress_eth0) $(/bin/hostname)" | sudo tee -a /etc/hosts' echo "Successfully copied public keys to slave ${i}" 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..." @@ -43,7 +48,7 @@ function copy-ssh-keys-to-slave() { # to which VM types. openstack stack show -c outputs "$STACK_NAME" -# shellcheck disable=SC2006 +# shellcheck disable=SC2006,SC2207 ADDR=(`openstack stack show -f json -c outputs "$STACK_NAME" | \ jq -r '.outputs[] | \ select(.output_key | match("^vm_[0-9]+_ips\$")) | \