Bug 1883605 - oc image info is not listing manifest list image
Summary: oc image info is not listing manifest list image
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard: non-multi-arch
: 1884693 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-29 16:53 UTC by jashokr
Modified: 2020-10-23 17:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-23 17:03:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc issues 583 0 None open oc image info is not listing manifest list image 2020-10-23 15:02:45 UTC

Description jashokr 2020-09-29 16:53:12 UTC
Description of problem:

Trying to list tags in a remote registry for an image and oc image info currently throws error when manifest list image is passed as argument


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce / Actual results:

 $ oc image info docker.io/ibmcom/ibm-cloud-databases-redis-catalog -o json | jq .name
"docker.io/ibmcom/ibm-cloud-databases-redis-catalog:1.1.0-amd64"
error: the image is a manifest list and contains multiple images - use --filter-by-os to select from:

  OS          DIGEST
  linux/amd64 sha256:8204e600cb93dc9a69aee3c68cc792da9ab45c29caf492c8a4b7439402ed051f
  linux/s390x sha256:0f3e17bb61ee6f038eecf52e0ea28b77a72c718413f3bc4d3f577c4ba17c2335

"docker.io/ibmcom/ibm-cloud-databases-redis-catalog:1.1.0-s390x"


Expected results:


using --filter-by-os='.*' should allow listing fat manifest image without errors

Additional info:


here is equivalent of skopeo that works

$
skopeo list-tags docker://docker.io/ibmcom/ibm-cloud-databases-redis-catalog
{
    "Repository": "docker.io/ibmcom/ibm-cloud-databases-redis-catalog",
    "Tags": [
        "1.1.0-amd64",
        "1.1.0-s390x",
        "1.1.0",
        "2020-06-19-1592598205",
        "2020-06-29-1593469741",
        "2020-09-04-dev-amd64",
        "2020-09-10-1599706973",
        "latest-amd64",
        "latest-s390x",
        "latest"
    ]
}

Comment 1 Sally 2020-10-01 19:40:15 UTC
This works:
`oc image --filter-by-os=linux/s390x info docker.io/ibmcom/ibm-cloud-databases-redis-catalog`

or this:
`oc image --filter-by-os=linux/amd64 info docker.io/ibmcom/ibm-cloud-databases-redis-catalog`  

I'll look at why we don't allow the wildcard filter with `oc image info --filter-by-os=.*`  I seem to remember there was a reason. FWIW the `oc image info` help menu does not include using the wildcard.  Looking at this in the upcoming sprint.

Comment 2 Maciej Szulik 2020-10-05 08:14:19 UTC
*** Bug 1884693 has been marked as a duplicate of this bug. ***

Comment 3 Sally 2020-10-05 21:25:34 UTC
`oc image extract`, `oc image info`, and `oc image mirror` only handle the single --filter-by-os value, and this is noted in the help menu.

The only command that can accept `--filter-by-os=.*` is `oc image mirror`.  In all other cases, you must pass a single
os/arch to --filter-by-os. 

As mentioned in Comment1, these succeed:

$ oc image --filter-by-os=linux/s390x info docker.io/ibmcom/ibm-cloud-databases-redis-catalog
$ oc image --filter-by-os=linux/amd64 info docker.io/ibmcom/ibm-cloud-databases-redis-catalog 

Also, you can run any of these:

$ oc image info docker.io/ibmcom/ibm-cloud-databases-redis-catalog:1.1.0-amd64
$ oc image info docker.io/ibmcom/ibm-cloud-databases-redis-catalog:1.1.0-s390x

or any of the other tags that are available, such as:

$ oc image info docker.io/ibmcom/ibm-cloud-databases-redis-catalog:latest-s390x
$ oc image info docker.io/ibmcom/ibm-cloud-databases-redis-catalog:latest-amd64

I'm not sure this is a bz, I will discuss with the workloads team and will report back.

Comment 4 Clayton Coleman 2020-10-05 21:37:01 UTC
This is a feature request, although it is reasonable.  Image extraction would not work with manifest lists, image info should be able to print the manifest list (as a new display type) and then display each image referenced from the manifest list.

Comment 5 Sally 2020-10-23 17:03:20 UTC
This is being tracked in Jira, so I'm closing this as not a bug in favor of feature request:
https://issues.redhat.com/browse/WRKLDS-222
https://issues.redhat.com/browse/RHIBMCS-61


Note You need to log in before you can comment on or make changes to this bug.