oxidecomputer / oxidecomputer/packer-plugin-oxide
Wait for snapshot readiness before creating the image
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 3
Description
Problem
stepSnapshotCreate (component/builder/instance/step_snapshot_create.go) returns as soon as the API accepts the SnapshotCreate request and immediately hands off to stepImageCreate, which consumes the snapshot. Nothing polls the snapshot to the ready state.
If snapshot creation is (or becomes) asynchronous for large boot disks, this is a race between snapshot completion and ImageCreate.
Fix
Poll the snapshot state until ready (with a configurable timeout — see the timeouts issue) before proceeding to image creation, matching how the plugin already waits on instance start/stop transitions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in component/builder/instance/step_snapshot_create.go and compare its behavior with the plugin's existing waits for instance start and stop transitions. Trace the handoff to stepImageCreate, then verify that snapshot creation is polled until the ready state and that the image step does not begin earlier; account for the configurable timeout described by the timeouts issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100