copr-builder: don't give up RHSM unregistering
This way we have less work in the periodic cron job (see cleanup-unused-redhat-subscriptions script).
This commit is contained in:
parent
d731413fc5
commit
8b7f2dda0b
1 changed files with 6 additions and 1 deletions
|
@ -6,7 +6,12 @@ test -z "$RESALLOC_NAME" && die "no vm specified, empty \$RESALLOC_NAME variable
|
|||
|
||||
# Try to, best effort, remove the entitlement.
|
||||
set -- $(echo "$RESALLOC_RESOURCE_DATA" | base64 --decode)
|
||||
ssh root@"$1" "subscription-manager unregister" || :
|
||||
|
||||
# Don't give-up unregistering after the first attempt
|
||||
for _ in a b c; do
|
||||
ssh root@"$1" "subscription-manager unregister" && break
|
||||
sleep 5
|
||||
done
|
||||
|
||||
case "$RESALLOC_POOL_ID" in
|
||||
*aws*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue