Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
enolfc committed Oct 8, 2024
1 parent 68f73a3 commit 6614009
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion builder/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,22 @@ else
pushd builder
sed -i -e "s/%TOKEN%/$(cat ../.oidc_token)/" auth.dat
sed -i -e "s/%IMAGE%/$IMAGE_ID/" vm.yaml
set -x
im_client.py create vm.yaml
IM_INFRA_ID=$(im_client.py list | grep --extended-regexp --invert-match 'im.egi.eu|ID')
# get SSH command to connect to the VM
# do pay attention to the "1" parameter, it corresponds to the "show_only" flag
SSH_CMD=$(im_client.py ssh "$IM_INFRA_ID" 1 | grep --invert-match 'im.egi.eu')
# if the below works, the VM is up and running and responds to SSH
"$SSH_CMD true"
"$SSH_CMD true" || echo "Failed, still keep going"
# at this point we may want to run more sophisticated tests
# delete test VM
im_client.py destroy "$IM_INFRA_ID"
# delete test VMI
openstack --os-cloud tests --os-token "$OS_TOKEN" image delete "$IMAGE_ID"
popd
# force failure to avoid uploading
exit 1

# All going well, upload the VMI for sharing in AppDB
builder/refresh.sh vo.access.egi.eu "$(cat /var/tmp/egi/.refresh_token)" images
Expand Down

0 comments on commit 6614009

Please sign in to comment.