openstack tripleo container image show doesn't work with docker.io

Bug #1845400 reported by Steve Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Steve Baker

Bug Description

docker.io expects authenticated URLs to include the namespace, due to its scoping, so the following currently fails:
openstack tripleo container image show docker.io/library/centos:7 -f json
Failure: id a67d1379cef4790c61dc650010dec91f636543e6, status 401, reason Unauthorized text {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"library/centos","Action":"pull"}]}]}

Instead of using the --registry-url argument, the authentication should just use the image URL.

The delete command probably has the same issue with docker.io, but it appears to have different issues as well so another bug is probably appropriate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/684863

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/684863
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=3cf57669ec8c1d52ae5662967765230895273844
Submitter: Zuul
Branch: master

commit 3cf57669ec8c1d52ae5662967765230895273844
Author: Steve Baker <email address hidden>
Date: Thu Sep 26 11:15:50 2019 +1200

    Don't use --registry-url for image show auth

    This doesn't work for registries like docker.io because they expect
    the authentication url to include the namespace so they can determine
    the allowed scope of the request.

    Instead the image reference is used for authentication, and the docs
    include examples to make it clear that the registry host needs to be
    included in the image reference.

    This change also makes json the default formatter for the show
    command, so it can be used as a drop-in replacement for "skopeo
    inspect" and so that the output format is consistent with the docker
    commands.

    Change-Id: I30ce5c53e3eac758f52f31cc9ed3f2dff35eb4cb
    Closes-Bug: #1845400

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.3.0

This issue was fixed in the openstack/python-tripleoclient 12.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.