Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error importing container with a name containing a colon #1371

Closed
3 tasks done
gzcwnk opened this issue Aug 26, 2024 · 3 comments · Fixed by #1387
Closed
3 tasks done

error importing container with a name containing a colon #1371

gzcwnk opened this issue Aug 26, 2024 · 3 comments · Fixed by #1387
Assignees
Milestone

Comments

@gzcwnk
Copy link

gzcwnk commented Aug 26, 2024

Steps to reproduce

When I made a container name I used a : this caused the following error,

[root@vuwunicoslurmt1 rocky8-27-8-2024]# podman save rocky8:8.x > rocky8:8.x.tar

[root@vuwunicoslurmt1 rocky8-27-8-2024]#
[root@vuwunicoslurmt1 rocky8-27-8-2024]#
[root@vuwunicoslurmt1 rocky8-27-8-2024]# wwctl container import rocky8:8.x.tar rocky8:8.x
ERROR : could not import image: opening file "//root/podman/rocky8-27-8-2024/rocky8": open //root/podman/rocky8-27-8-2024/rocky8: no such file or directory
ERROR: could not import image: opening file "//root/podman/rocky8-27-8-2024/rocky8": open //root/podman/rocky8-27-8-2024/rocky8: no such file or directory
[root@vuwunicoslurmt1 rocky8-27-8-2024]# ls -l
total 2779820
-rw-r--r--. 1 root root 345 Aug 26 15:59 container_exit.sh
-rw-r--r--. 1 root root 1056 Aug 26 15:43 Containerfile
-rw-r--r--. 1 root root 24 Aug 26 15:53 excludes
-rw-r--r--. 1 root root 2846520320 Aug 26 16:22 rocky8:8.x.tar

renaming it,

mv rocky8:8.x.tar rocky8-8.x.tar
[root@vuwunicoslurmt1 rocky8-27-8-2024]# wwctl container import rocky8-8.x.tar rocky8:8.x
Copying blob f11c864af433 done |
8><----

and it seems to work fine, (nodes boot Ok off it)

Error message

As above.

Information on your system

[root@vuwunicoslurmt1 rocky8-27-8-2024]# wwctl version
wwctl version: 4.5.6-1
rpc version: apiPrefix:"rc1" apiVersion:"1" warewulfVersion:"4.5.6-1"
[root@vuwunicoslurmt1 rocky8-27-8-2024]#

[root@vuwunicoslurmt1 rocky8-27-8-2024]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.10 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.10"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.10 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.10"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.10"
[root@vuwunicoslurmt1 rocky8-27-8-2024]#

General information

  • I have run wwctl version and reported the contents of /etc/os-release
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have captured and reported relevant error messages and logs
@gzcwnk gzcwnk added the bug label Aug 26, 2024
@anderbubble anderbubble added this to the v4.5.x milestone Aug 27, 2024
@anderbubble
Copy link
Collaborator

Thanks for moving this here, @gzcwnk!

@anderbubble anderbubble changed the title I was asked to open an issue with importing my container into warewulf4.5.6-1 error importing container with a name containing a colon Sep 11, 2024
@anderbubble anderbubble modified the milestones: v4.5.x, v4.5.8 Sep 11, 2024
@anderbubble
Copy link
Collaborator

@JasonYangShadow can you investigate this?

@JasonYangShadow
Copy link
Member

JasonYangShadow commented Sep 12, 2024

it is an upstream issue, colon is kind of restricted symbol inside the file/path name.
https://github.com/containers/image/blob/31d4ad14fe4da8ef3969ff67297831ab291c76f1/docker/archive/transport.go#L65
refString here is the abs path, e.g. /home/vagrant/rocky8:8.x.tar, it'll treat the file name as an image and a tag by splitting based on :.
Also it is not recommended to create tar file using colon in the name
containers/podman#489
containers/podman#694

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants
@anderbubble @JasonYangShadow @gzcwnk and others