Bug 1906276 - `oc image append` can't work with multi-arch image with --filter-by-os='.*'
Summary: `oc image append` can't work with multi-arch image with --filter-by-os='.*'
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.7.0
Assignee: Sally
QA Contact: zhou ying
Depends On:
TreeView+ depends on / blocked
Reported: 2020-12-10 06:06 UTC by zhou ying
Modified: 2021-02-24 15:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-02-24 15:41:51 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift oc pull 707 0 None closed Bug 1906276: oc image append|extract: clarify help for --filter-by-os 2021-01-28 06:46:41 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:42:14 UTC

Description zhou ying 2020-12-10 06:06:57 UTC
Description of problem:
`oc image append` can't work with multi-arch image with  --filter-by-os='.*'

Version-Release number of selected component (if applicable):
[root@preserver-workloadrhel-1 1204]# oc version 
Client Version: 4.7.0-202012091125.p0-0229219

How reproducible:

Steps to Reproduce:
1) use command as follow:
`oc image append --from localhost:5000/must-gather:latest --filter-by-os='.*' --to privateregistry:5000/openshifttest/must-gather:latest /root/oc.tar.gz   --insecure`

Actual results:
1) Failed with error: 
error: unable to parse image localhost:5000/must-gather:latest: unknown image manifest of type *manifestlist.DeserializedManifestList from manifest sha256:d8e0b62c75bff609394bfaa43c923480d2d0bf2f7a3f36fd28ec601f99f3d25c

Expected results:
1) No error, and could append to multi-arch image.
Additional info:

Comment 1 Sally 2021-01-08 21:00:48 UTC
The wildcard filter is not supported with oc image append|extract. There is a PR to clarify this and also update the help menu: https://github.com/openshift/oc/pull/513

Comment 2 Sally 2021-01-14 22:27:34 UTC
I've split the help text update commits from the PR in Comment#1 into a separate PR to be merged within the next sprint: https://github.com/openshift/oc/pull/707

Comment 4 zhou ying 2021-01-19 03:22:18 UTC
Comfirmed with latest oc client: 

[root@dhcp-140-138 ~]# oc  image append -h
Add layers to container images

  # Add a new layer to a multi-architecture image for an os/arch that is different from the system's os/arch
  # Note: Wildcard filter is not supported with append. Pass a single os/arch to append.
  oc image append --from docker.io/library/busybox:latest --filter-by-os=linux/s390x --to myregistry.com/myimage:latest

[root@dhcp-140-138 ~]#  oc version --client
Client Version: 4.7.0-202101162121.p0-4d52be6

Will move to verified status.

Comment 7 errata-xmlrpc 2021-02-24 15:41:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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