Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
address #128
Browse files Browse the repository at this point in the history
pcfe committed Oct 22, 2020
1 parent 50f99f0 commit 0a86a5d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions buildtestvms.sh
Original file line number Diff line number Diff line change
@@ -27,11 +27,11 @@ fi
# rebuild test VMs
for I in "${TEST_VM_LIST[@]}"
do
inform "Rebuilding VM ID $I"
inform "Rebuilding VM $I"
ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} \
"hammer host update --id $I --build yes"
"hammer host update --name $I --build yes"

_PROBED_STATUS=$(ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} "hammer host status --id $I" | grep Power | cut -f2 -d: | tr -d ' ')
_PROBED_STATUS=$(ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} "hammer host status --name $I" | grep Power | cut -f2 -d: | tr -d ' ')

# different hypervisors report power status with different words. parse and get a single word per status
# KVM uses running / shutoff
@@ -69,13 +69,13 @@ do
then
# forcefully poweroff the SUT
ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} \
"hammer host stop --force --id $I"
"hammer host stop --force --name $I"
ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} \
"hammer host start --id $I"
"hammer host start --name $I"
elif [[ ${_STATUS} == 'Off' ]]
then
ssh -q -l ${PUSH_USER} -i ${RSA_ID} ${SATELLITE} \
"hammer host start --id $I"
"hammer host start --name $I"
else
err "Host $I is neither running nor shutoff. No action possible!"
exit 1

0 comments on commit 0a86a5d

Please sign in to comment.