infra-sync: refuse to render dev's vault onto a host that is not dev #107
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Jinemi/thermograph#107
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/sync-dev-render-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while executing the vps1/vps2 cutover, before it could bite.
sync-devrendereddeploy/secrets/dev.yamlinto/etc/thermograph.envunconditionally. That path is dev's env file — and it is also beta's, on the box beta is still running on until the cutover completes. The firstsync-devrun only escaped this by failing earlier, on the not-yet-created/opt/thermograph-dev. The moment that checkout exists, the next push todevwould have overwritten the live env file of the environment currently servingbeta.thermograph.orgwith dev's credentials — beta's containers would keep running (env_fileis read at container start) and then come up on their next deploy pointed at dev's database password.The fix gates the render on the host's own
secrets-envmarker, whichprovision-dev.shflips todevonly after beta has vacated vps1. Until then the job syncs the checkout and skips the render loudly rather than failing. Ordering is now enforced by the host's own statement of what it is, instead of by remembering to do the steps in the right order.Also records the constraint in the cutover runbook's step 8, since "the checkout is safe to create early, the marker is not" is exactly the kind of thing that reads as arbitrary later.
No behaviour change once vps1 really is dev.