Skip to content

upload-ami: upload EBS direct snapshots with coldsnap - #388

Closed
Kranzes wants to merge 4 commits into
NixOS:mainfrom
Kranzes:coldsnap
Closed

Kranzes wants to merge 4 commits into
NixOS:mainfrom
Kranzes:coldsnap

Conversation

@Kranzes

@Kranzes Kranzes commented Nov 18, 2026

Copy link
Copy Markdown
Member

Stacked on #387, so only the last commit is new.

  • --ebs-direct uploads with coldsnap and skips all-zero blocks. For a NixOS image that halves the upload (1.98 of 3.92 GiB on x86_64).
  • Images that aren't raw, like the VHD from Hydra, are converted with qemu-img before the upload.

@arianvp

arianvp commented Nov 18, 2026

Copy link
Copy Markdown
Member

Why? We already implemented EBS direct upload directly in Python. Coldsnap was very buggy in our experience

@arianvp

arianvp commented Nov 18, 2026

Copy link
Copy Markdown
Member

Reason for our rewrite was awslabs/coldsnap#362 . The python code is more robust against network failures and upstream seems slow/abandoned.

@arianvp

arianvp commented Nov 18, 2026

Copy link
Copy Markdown
Member

Also the zero-block skipping in coldsnap is actually broken. We can add the skipping to the python code and not repeat their mistakes instead: awslabs/coldsnap#470

Images without the file register as before.

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
Skipping all-zero blocks halves the upload of a NixOS image (1.98 of
3.92 GiB on x86_64). That only happens without EBS encryption by
default, since unwritten blocks of an encrypted snapshot don't read back
as zeros. Images that aren't raw are converted with qemu-img first, and
a snapshot whose wait fails is deleted, as before.

Assisted-by: Claude:claude-opus-5-5

This branch was successfully deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants