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 1688041

Summary: podman image save removes existing image
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Sedlák <psedlak>
Component: podmanAssignee: Qi Wang <qiwan>
Status: CLOSED WONTFIX QA Contact: atomic-bugs <atomic-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0CC: dwalsh, jligon, lsm5, mheon, qiwan
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: podman-1.4.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 07:39:27 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 Pavel Sedlák 2019-03-13 00:48:10 UTC
Description of problem:
When attempting to export image content into file, when destination file (specified by -o) already exists, podman refuses the operation and informs that it cannot modify existing image.
But at the same time it erases the destination file.

Version-Release number of selected component (if applicable):
> podman-1.0.0-2.git921f98f.module+el8+2785+ff8a053f.x86_64

How reproducible: always

Steps to Reproduce:

> [root@undercloud-0 img.d]# podman image save -o /tmp/img 192.168.24.1:8787/rhosp15/openstack-glance-api:20190311.1
> Getting image source signatures
> Copying blob 6dc95b5438fb: 205.77 MiB / 205.77 MiB [========================] 8s
> Copying blob 569f57f28708: 10.00 KiB / 10.00 KiB [==========================] 8s
> Copying blob c05daf4fbb45: 125.41 MiB / 125.41 MiB [========================] 8s
> Copying blob c315e7e9e481: 240.77 MiB / 240.77 MiB [========================] 8s
> Copying blob 68a4db334ec4: 215.90 MiB / 215.90 MiB [========================] 8s
> Copying blob e471e2366f03: 44.67 MiB / 44.67 MiB [==========================] 8s
> Copying config e3527fa677a4: 4.18 KiB / 4.18 KiB [==========================] 0s
> Writing manifest to image destination
> Storing signatures
> [root@undercloud-0 img.d]# ll /tmp/img
> -rw-r--r--. 1 root root 873000960 Mar 13 00:44 /tmp/img
> [root@undercloud-0 img.d]# podman image save -o /tmp/img 192.168.24.1:8787/rhosp15/openstack-glance-api:20190311.1
> unable to save ["192.168.24.1:8787/rhosp15/openstack-glance-api:20190311.1"]: Error copying image to the remote destination: Error initializing destination docker-archive:/tmp/img:192.168.24.1:8787/rhosp15/openstack-glance-api:20190311.1: docker-archive doesn't support modifying existing images
> [root@undercloud-0 img.d]# ll /tmp/img
> ls: cannot access '/tmp/img': No such file or directory


Actual results:
After podman rejects to modify the existing image, image is also removed.

Expected results:
After podman rejects to modify the existing image, image stays in place without modifications.


Additional info:

Comment 1 Qi Wang 2019-03-13 15:57:10 UTC
I received this bug. (test my bugzilla account)

Comment 3 Qi Wang 2019-08-14 14:27:24 UTC
Yes. PR has been merged. https://github.com/containers/libpod/pull/2720

Comment 6 RHEL Program Management 2021-02-01 07:39:27 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.