undercloud container registry does not properly support oci containers

Bug #1860585 reported by Alex Schultz on 2020-01-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Critical
Alex Schultz

Bug Description

Older buildah versions used to create the docker format by default but this has changed to be oci in more recent builds (buildah-1.11.6-4.module+el8.1.1+5259+bcdd613a.x86_64). The undercloud registry only currently supports docker formatted containers so when an oci one is pushed, the metadata is not correct for podman to fetch the container. When podman attempts to pull the image, it fails with:

(undercloud) [cloud-user@undercloud ~]$ sudo podman pull docker://undercloud.ctlplane.localdomain:8787/foo/foo:latest
Trying to pull docker://undercloud.ctlplane.localdomain:8787/foo/foo:latest...
  unsupported docker v2s2 media type: ""
Error: error pulling image "docker://undercloud.ctlplane.localdomain:8787/foo/foo:latest": unable to pull docker://undercloud.ctlplane.localdomain:8787/foo/foo:latest: unable to pull image: Error initializing image from source docker://undercloud.ctlplane.localdomain:8787/foo/foo:latest: unsupported docker v2s2 media type: "

This impacts the ansible-role-tripleo-modify-image workflow via ContainerImagePrepare.

This can be worked around by always specifying "--format docker" when doing buildah builds.

This impacts CI as we use this code to update the containers with the latest version of packages.

Changed in tripleo:
assignee: nobody → Alex Schultz (alex-schultz)
Waldemar Znoinski (wznoinsk) wrote :

FYI: as a (early) test I've applied https://review.opendev.org/#/c/703846/1 on top of a downstream OSP 16 CI undercloud:

[root@undercloud-0 tripleo-modify-image]# patch -p1 < 1e10b22.diff
patching file tasks/yum_install_buildah.yml
patching file tasks/yum_update_buildah.yml
Hunk #1 succeeded at 137 (offset -5 lines).
patching file vars/main.yml

which was failing before and now it is passing the 'podman pull' succesfully

good work, thanks!

Reviewed: https://review.opendev.org/703859
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=39f0f369b947120ebc5faa80946621065d1fae10
Submitter: Zuul
Branch: master

commit 39f0f369b947120ebc5faa80946621065d1fae10
Author: Alex Schultz <email address hidden>
Date: Wed Jan 22 12:10:58 2020 -0700

    Force docker format

    Newer versions of buildah create OCI containers but the undercloud
    registry does not support the OCI container metadata format so these
    cannot be used with newer podman. For now this can be worked around by
    explicitly passing --format docker when running buildah build related
    commands.

    Change-Id: I25c7a239add99e2d4dac433794d6ca92a58942b6
    Related-Bug: #1860585

Reviewed: https://review.opendev.org/703996
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=6fc665cbb679a157280ae5e24a5fddf7ff7a17dc
Submitter: Zuul
Branch: stable/train

commit 6fc665cbb679a157280ae5e24a5fddf7ff7a17dc
Author: Alex Schultz <email address hidden>
Date: Wed Jan 22 12:10:58 2020 -0700

    Force docker format

    Newer versions of buildah create OCI containers but the undercloud
    registry does not support the OCI container metadata format so these
    cannot be used with newer podman. For now this can be worked around by
    explicitly passing --format docker when running buildah build related
    commands.

    Change-Id: I25c7a239add99e2d4dac433794d6ca92a58942b6
    Related-Bug: #1860585
    (cherry picked from commit 39f0f369b947120ebc5faa80946621065d1fae10)

tags: added: in-stable-train

Reviewed: https://review.opendev.org/703997
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=5575f381aabb19de76315a8a060825e5270f5ec0
Submitter: Zuul
Branch: stable/stein

commit 5575f381aabb19de76315a8a060825e5270f5ec0
Author: Alex Schultz <email address hidden>
Date: Wed Jan 22 12:10:58 2020 -0700

    Force docker format

    Newer versions of buildah create OCI containers but the undercloud
    registry does not support the OCI container metadata format so these
    cannot be used with newer podman. For now this can be worked around by
    explicitly passing --format docker when running buildah build related
    commands.

    Change-Id: I25c7a239add99e2d4dac433794d6ca92a58942b6
    Related-Bug: #1860585
    (cherry picked from commit 39f0f369b947120ebc5faa80946621065d1fae10)

tags: added: in-stable-stein
wes hayutin (weshayutin) on 2020-02-10
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
wes hayutin (weshayutin) on 2020-02-12
Changed in tripleo:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers