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

fix issue #128 #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions buildtestvms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down