oxidecomputer / oxidecomputer/packer-plugin-oxide

Wait for snapshot readiness before creating the image

Open
#110 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Packer Plugin
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.