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 1797599 - podman cannot support load tarball which the name with colon but docker can support this
Summary: podman cannot support load tarball which the name with colon but docker can s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: podman
Version: 7.8
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-03 13:38 UTC by kevin
Modified: 2020-04-01 00:26 UTC (History)
9 users (show)

Fixed In Version: podman-1.6.4-7.el7_8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-01 00:25:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:1227 0 None None None 2020-04-01 00:26:12 UTC

Description kevin 2020-02-03 13:38:27 UTC
Description of problem:

Podman cannot support container image tarball which the name with colon (:)

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


How reproducible:

for example:

[root@localhost container]# podman version
Version:            1.4.4
RemoteAPI Version:  1
Go Version:         go1.10.3
OS/Arch:            linux/amd64
[root@localhost container]# hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: a578c2e325c64423bff97b7d2e54a87f
           Boot ID: 98fbd7eaa4dc4d008012136a729c7b70
    Virtualization: vmware
  Operating System: OpenShift Enterprise
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.6:GA:server
            Kernel: Linux 3.10.0-957.el7.x86_64
      Architecture: x86-64

[root@localhost container]# podman version
Version:            1.4.4
RemoteAPI Version:  1
Go Version:         go1.10.3
OS/Arch:            linux/amd64

[root@localhost container]# ll
total 9212
-rw-r--r--. 1 root root 9430705 Feb  3 20:47 registry:2.tar.gz

[root@localhost container]# podman load -i registry:2.tar.gz 
Error: invalid filename (should not contain ':') "registry:2.tar.gz"

[root@localhost container]# mv registry:2.tar.gz registry_2.tar.gz
 
[root@localhost container]# podman load -i registry_2.tar.gz 
Getting image source signatures
Copying blob a330d9dc14ce done
Copying blob c62467775792 done
Copying blob 9d08b7a37338 done
Copying blob 7444ea29e45e done
Copying blob 588f0b714a86 done
Copying config 708bc6af7e done
Writing manifest to image destination
Storing signatures
Loaded image(s): docker.io/library/registry:2


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
we want the podman should support load tarball which the name with colon.
currently, Docker daemon can support load tarball which the name with colon

Additional info:

Comment 2 Miloslav Trmač 2020-02-03 14:48:27 UTC
I’m afraid this a known limitation; the : character is special the internal implementation of the docker-archive: transport.

You can use (podman load < registry:2.tar.gz), which makes the file name irrelevant to podman, at the cost of making an extra on-disk copy in /var/tmp, rename the input, or use a symlink.

I guess podman could create a temporary symlink automatically.

Comment 3 kevin 2020-02-04 01:15:07 UTC
I have found the extra on-disk copy in /var/tmp after I load the image successully using (podman load < registry:2.tar.gz)

cd /var/tmp/
[root@localhost tmp]# ls
docker-tar065395217  docker-tar267917452  docker-tar724534814
docker-tar214226193  docker-tar306480357  docker-tar854366455
docker-tar216811232  docker-tar708259437  docker-tar860970637

how to avoid this issue?

Comment 4 Miloslav Trmač 2020-02-04 17:53:01 UTC
Thanks for the report, that’s a straightforward bug (in both Podman and Buildah): https://github.com/containers/libpod/blob/537352cc3ee60373b41481a7f48e65b1978ea5f7/libpod/image/pull.go#L125 does not have a matching tarSource.Close().

This only happens if the input is compressed, so, as a possible _temporary_ workaround, you can decompress the image yourself (which will avoid creating the /var/tmp/docker-tar* copies, so it won’t require extra disk space — it could even be faster, because the content will be decompressed only once), and then delete the decompressed version manually. But we should just fix at least that part.

Comment 6 Tom Sweeney 2020-02-04 22:59:00 UTC
Setting this PR to POST and sending it to Jindrich to package once the PR's merge in.  Thanks Miloslav.

Comment 7 kevin 2020-02-05 00:09:53 UTC
which version fir podman the bug will be fixed?

Comment 8 Tom Sweeney 2020-02-05 00:30:54 UTC
Matt Heon, can you answer Kevin as to which version of Podman this will be in?  At the earliest, Podman 1.8.0, but I'm guessing 1.8.1 or 1.9.0 whichever release comes after 1.8.0.  But Matt's the person that will know for sure.

Comment 9 Matthew Heon 2020-02-05 14:21:22 UTC
1.8.0 final, probably releasing tomorrow upstream, should include a fix for the tar issue. I don't believe a fix for the issue of `:` in filenames is presently planned, the workaround of redirecting it into STDIN seems to work well enough.

Comment 10 kevin 2020-02-06 01:57:36 UTC
Have any plan to give the feature of podman save multiple images into one tarball?

Comment 11 Daniel Walsh 2020-02-06 14:18:02 UTC
It has been talked about, but we need community members to step up to do the work, hint, hint.

Comment 15 errata-xmlrpc 2020-04-01 00:25:22 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, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2020:1227


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