Repository navigation
feat: backups for container persistent volumes - #885
Merged
Merged
Conversation
Persistent volumes get a snapshot schedule that is on by default (every 24 hours, kept 7 days) and can be tuned or turned off. The schedule is validated against the limits every cloud's native snapshot scheduler shares, and container outputs gain the volume list with each volume's latest snapshot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Enclave skipped this draft pull request. It will run automatically when you mark the PR as Ready for review. |
A restore request names a container, a replica ordinal and a snapshot. Controllers act on each request once and report the result per volume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Volume backups on AWS are scheduled with Data Lifecycle Manager and need snapshot create/list/delete plus tagging of existing volumes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…me backups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CreateLifecyclePolicy has no resource type in IAM, so a policy ARN in the statement would never match. Bound it by request tags instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…zure' into alon/alien-1232-volume-backups
…cp' into alon/alien-1232-volume-backups
…into alon/alien-1232-volume-backups-restore
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Azure Disk Backup keeps operational snapshots for at most a year, so a daily schedule kept 450 days would deploy on AWS and GCP but fail on Azure. The portable limit is now 365 days. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n api Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into alon/alien-1232-volume-backups-azure
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uming backups Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A role that does not exist has no tags, so tag-conditioned IAM calls on
it are denied instead of reporting it missing. The role name now carries
a hash of the stack prefix and container ID, so the grant covers
{prefix}-dlm-*. Volume growth gets ec2:ModifyVolume, and the EC2 client
reads the attachment state from <status>, as EC2 sends it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cp' into alon/alien-1232-volume-backups
…estore' into alon/alien-1232-volume-backups
…ws' into alon/alien-1232-volume-backups
…zure' into alon/alien-1232-volume-backups
Installations set up before volume backups lack the management permissions the schedule needs. Containers report that state instead of failing, so it can be shown and fixed with a setup update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Management permissions are installed by setup and a release update never refreshes them. The remote stack management controllers now record a revision of the permissions they applied, and an Alien direct setup re-applies them when the revision changes. Runtime credentials never trigger this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
|
Following a nextLink on another host would send it the management token. Also documents that Kubernetes and local controllers report no volumes, so they never get a backup status or a restore request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
1 similar comment
Member
Author
|
@greptileai review |
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
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.
Tracks ALIEN-1232.
Containers with
.persistentStorage()get one block volume per replica. Before this change nothing snapshotted those volumes, and deleting the container deleted them immediately. This branch adds the types, cloud clients, permissions and CLI for volume backups and restore on AWS, GCP and Azure.Config
persistentStorage(size, { backups }). Backups are on by default: every 24 hours, kept 7 days. Tune them withintervalHours(1, 2, 4, 6, 8, 12 or 24) andretentionDays(at most 365), or turn them off withbackups: false.Outputs
ContainerOutputs.volumes: each replica's volume, zone, latest snapshot, and last restore.ContainerOutputs.volumeBackups:active,disabledorsetupRequired, with a message.Restore
DeploymentConfig.volumeRestorescarries restore requests (request ID, resource, ordinal, snapshot) to the controller. The manager's sync route passes them through.alien deployments volumes,alien deployments restore-volume <deployment> --resource <id> --ordinal <n> --snapshot <id>, andalien deployments cancel-volume-restore.Controllers in this repository
volumeBackupsstatus. A restore request can only target a volume listed inContainerOutputs.volumes, so it can't target these controllers.Cloud clients
nextLinkonly on the management endpoint's host, so the bearer token never goes to another host.Permissions
container/provisiongrants the schedule and snapshot calls. AWS grants are bound to the deployment's resource tags, and IAM role grants to the<prefix>-dlm-*name with PassRole limited todlm.amazonaws.com.container/managementgrants only the status reads.setupRequireduntil the setup is updated, for example with a CloudFormation stack update orterraform apply. The remote stack management controllers now record a revision of the management permissions they applied, so an Alien direct setup re-applies them when the permission set changes. A running direct install has no command yet that re-runs setup:alien deploywaits on the deployment lock.Tests
Generated files:
packages/core/src/generatedwas regenerated withpnpm generate. The platform TypeScript SDK still needs regenerating with Speakeasy 1.680.11 (pnpm run generate:api-platform-sdk) before merge.🤖 Generated with Claude Code