Skip to content

hypeman build --image-name: the re-tagged image never becomes ready ('get image: image not found'); only builds/<id> is usable #395

Description

@mpuig

Version: v0.3.0 (API), Linux release install, ubuntu-latest (GitHub-hosted runner).

Symptom

A successful named build leaves the named image pending forever; any instance created from it is refused image_not_ready. Journal:

{"msg":"build succeeded","id":"hpraalgz…","digest":"sha256:2ef3ade…"}
{"msg":"re-tagged build image","from":"builds/hpraalgz…","to":"docker.io/library/barista-scenario:latest"}
{"level":"WARN","msg":"re-tagged image conversion timed out",
 "image_name":"barista-scenario","error":"get image: image not found"}

GET /images then reports the named image pending indefinitely (observed >10 minutes), while builds/{id} is converted and ready before the CLI returns (the KERNEL-863 wait covers exactly that handle).

What the code path looks like from outside

After a build, lib/builds/manager.go re-tags via ImportLocalImage(repo, tag, digest) and then waitForImageReady(taggedRef) — and that wait fails with get image: image not found (WaitForReady's 30s existence poll → GetImage → tag-symlink resolution). So either the import registers the image under a reference the tag lookup doesn't resolve (normalization mismatch between repo:tag and what ImportLocalImage/createTagSymlink store), or the tag symlink is only created at conversion completion while the conversion for the re-tagged repo never runs — the observed terminal state is pending, i.e. queued and never started, not failed.

Since only a WARN records it, the build still reports ready, and the failure surfaces much later as image_not_ready at instance creation — with nothing pointing back at the re-tag.

Workaround

Create instances from builds/{build-id}@{digest} (the id from Build started:, the digest from Build Complete:) and ignore the requested name. Works reliably.

Suggested fix

Whatever the root cause, two things would make it non-silent: fail the build (or at least mark the named image failed) when the re-tag wait errors, and include the re-tag error in the build's status instead of only the journal.

Found while building barista on hypeman — full evidence and repro steps in our findings doc, §11; the repro is our public acceptance workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions