-
Notifications
You must be signed in to change notification settings - Fork 38
Lock instances to prevent accidental changes #844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bertiethorpe
wants to merge
26
commits into
main
Choose a base branch
from
feat/prevent-prod-changes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
|
Should probably do a fatimage build for this to check it doens't somehow break that. We don't need to bump the image though. |
sjpb
requested changes
Nov 7, 2025
Collaborator
sjpb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review
sjpb
requested changes
Nov 12, 2025
e355f49 to
6119c22
Compare
sjpb
requested changes
Nov 13, 2025
7947368 to
b0afab5
Compare
b0afab5 to
80d3b4c
Compare
Collaborator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ansible/site.ymlplaybook now locks instances to prevent inadvertent changes/deletion to cluster instances. Instances are automatically unlocked by theansible/adhoc/rebuild-via-slurm.yml. Instances must be manually unlocked using theansible/adhoc/unlock.ymlplaybook before runningtofu apply,tofu destroyor the developmentansible/adhoc/rebuild.ymlplaybook.An image build is not required to be commited in this PR, but should be carried out to test the revised code.
This only protects instances. Volumes for production environments should not be tofu-controlled as per the production docs.
Some alternative approaches were considered and rejected:
This results in an error message like this if in a protected env:
and actually running a plan/apply/delete requires using
tofu apply -var=allow_tofu=true.this would only apply to new environments, and would have to be manually-copied in to existing environments to get the benefit. Given this would not (on its own) protect from e.g. CLI/Horizon changes, it does not currently seem worth implementing.