Add some warnings around virsh-cleanup#87
Add some warnings around virsh-cleanup#87openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
scripts/maintenance/virsh-cleanup
Outdated
There was a problem hiding this comment.
[[ and =~ are Bash-isms. Can we use:
echo "Press control-C to abort, or enter to continue."
readThere was a problem hiding this comment.
Can I just change it to /bin/bash instead?
There was a problem hiding this comment.
Can I just change it to
/bin/bashinstead?
The Control-C/enter approach seems usable enough to me that I don't think it's worth breaking POSIX compat. But most folks will have Bash, so I don't feel too strongly about it. And I'm not an approver anyway ;).
There was a problem hiding this comment.
An alternative to require an explicit Y/y in POSIX would be something like
printf 'Warning: This will destroy effectively all libvirt resources\nContinue [yN]? '
read CONTINUE
if test "${CONTINUE}" != y -a "${CONTINUE}" != Y
then
echo 'Aborted' >&2
exit 1
fiThere was a problem hiding this comment.
@cgwalters I don't want to break POSIX compatibility since I depend on that to use these scripts. If it has to be bash, you need to use #!/usr/bin/env bash, but I like @wking's first suggestion better.
I actually had some other VMs; luckily in my case they're all easy to recreate, but others may not be in the same situation.
1bd7d07 to
ffc01c6
Compare
|
/lgtm |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, crawford, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The e2e-aws error was: which is obviously unreleated to this change to an untested script. /retest |
|
This time the e2e-aws error was: Dunno why e2e-aws has been so flaky recently... /retest |
Fix openshift#78 for TF to operate correctly on stages
I actually had some other VMs; luckily in my case they're all
easy to recreate, but others may not be in the same situation.