Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2058491

Summary: podman 3.0.1 ~ 3.2.3: docker-archive doesn't support modifying existing images
Product: Red Hat Enterprise Linux 8 Reporter: XinhuaLi <xili>
Component: podmanAssignee: Valentin Rothberg <vrothber>
Status: CLOSED WONTFIX QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: bbaude, dwalsh, jligon, jnovy, lsm5, mheon, pthomas, tsweeney, umohnani, vrothber
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-13 14:16:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description XinhuaLi 2022-02-25 06:26:52 UTC
Description of problem:
WE can see error against podman command 

command 
---------------------------------------------------------
# podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05 --log-level=debug
---------------------------------------------------------

Images 
---------------------------------------------------------
REPOSITORY                                          TAG             IMAGE ID      CREATED        SIZE
registry.redhat.io/rhceph/rhceph-5-rhel8            latest          9e20ad683d05  3 weeks ago    1.07 GB
---------------------------------------------------------

error logs 
---------------------------------------------------------
...............
INFO[0000] Setting parallel job count to 7              
DEBU[0000] parsed reference into "[overlay@/var/lib/containers/storage+/var/run/containers/storage:overlay.mountopt=nodev,metacopy=on]@9e20ad683d05c46c638b49c492db604109fd6831ef80e6c1f2afd1bb53bdc503" 
Error: unable to save "9e20ad683d05": error copying image to the remote destination: Error initializing destination docker-archive:rhceph-5-rhel8_latest.tar: docker-archive doesn't support modifying existing images
---------------------------------------------------------

Version-Release number of selected component (if applicable):
podman 3.0.1 ~ 3.2.3

How reproducible:
execute command to save ceph image

command 
---------------------------------------------------------
# podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05 --log-level=debug
---------------------------------------------------------

Images 
---------------------------------------------------------
REPOSITORY                                          TAG             IMAGE ID      CREATED        SIZE
registry.redhat.io/rhceph/rhceph-5-rhel8            latest          9e20ad683d05  3 weeks ago    1.07 GB
---------------------------------------------------------

Steps to Reproduce:
1.
2.
3.

Actual results:
save image error 

Expected results:
no error 

Additional info:
We cannot see the issue against  "podman version 3.4.2", Please help to check. Will we backport the fix to RHEL 8.4 EUS?

Regards
Sam

Comment 1 Valentin Rothberg 2022-02-25 09:09:07 UTC
Thank you for reaching out.

> We cannot see the issue against  "podman version 3.4.2", Please help to check. Will we backport the fix to RHEL 8.4 EUS?

The docker-archive has never supported writing to an existing archive.  Can you recheck whether 3.4.2 really works in your tests?  I just tried and it does not.

Note that `podman save` supports writing multiple images at once to a docker-archive since version v2.1.0.  For instance, via `podman save fedora centos ubi-8 -o multi-archive.tar`.

Comment 2 XinhuaLi 2022-02-27 14:38:52 UTC
Hi Valentin,

Good day.
Please check logs below
------------------------------------------------
 # podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05
Copying blob a9820c2af00a done  
Copying blob 3d5ecee9360e done  
Copying blob 2f47f818417e done  
Copying config 9e20ad683d done  
Writing manifest to image destination
Storing signatures

# podman -v
podman version 3.4.2
------------------------------------------------

Regards
Sam

Comment 3 Valentin Rothberg 2022-02-28 08:30:17 UTC
(In reply to XinhuaLi from comment #2)
> [...]
>  # podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05
> Copying blob a9820c2af00a done  
> Copying blob 3d5ecee9360e done  
> Copying blob 2f47f818417e done  
> Copying config 9e20ad683d done  
> Writing manifest to image destination
> Storing signatures


Did the file `rhceph-5-rhel8_latest.tar` exist *before* running `podman save`?

Comment 4 XinhuaLi 2022-02-28 11:56:11 UTC
Hi Valentin,

Good day.
Please refer to the quick test below
------------------------------------------------------------------
# podman -v
podman version 3.2.3

# ls rhceph-5-rhel8_latest.tar
ls: cannot access 'rhceph-5-rhel8_latest.tar': No such file or directory

# podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05
Getting image source signatures
Checking if image destination supports signatures
Error: Can not copy signatures to docker-archive:rhceph-5-rhel8_latest.tar: Storing signatures for docker tar files is not supported
------------------------------------------------------------------

Regards
Sam

Comment 5 Valentin Rothberg 2022-03-02 08:50:08 UTC
(In reply to XinhuaLi from comment #4)
> [...]
> # podman save -o rhceph-5-rhel8_latest.tar 9e20ad683d05
> Getting image source signatures
> Checking if image destination supports signatures
> Error: Can not copy signatures to docker-archive:rhceph-5-rhel8_latest.tar:
> Storing signatures for docker tar files is not supported
> ------------------------------------------------------------------

That is a different error compared to the one listed in the initial report:
> Error: unable to save "9e20ad683d05": error copying image to the remote destination: Error initializing destination docker-archive:rhceph-5-rhel8_latest.tar: docker-archive doesn't support modifying existing images

Can you try again saving an image (without signatures)?

Comment 7 XinhuaLi 2022-09-13 14:04:37 UTC
The associated case has been closed and we can close the bug too.