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

[Windows] podman machine > podman export error #15247

Closed
nunix opened this issue Aug 9, 2022 · 4 comments · Fixed by #15455
Closed

[Windows] podman machine > podman export error #15247

nunix opened this issue Aug 9, 2022 · 4 comments · Fixed by #15455
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote windows issue/bug on Windows

Comments

@nunix
Copy link

nunix commented Aug 9, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

When trying to export a container to a tar.gz file on Windows (using podman machine as the backend), there's an error about the : due to the Windows path.
The \ are correctly escaped but not the : .

Steps to reproduce the issue:

All steps below are done in Powershell

  1. podman machine init
  2. podman machine start
  3. podman run --name fedora fedora
  4. podman export -o c:\wslsources\fedora.tar.gz fedora
  5. error thrown

As a workaround, here is a different Windows path that works:

  1. podman export -o /wslsources/fedora.tar.gz fedora

Describe the results you received:

The export results in the following error (based on the example above):
Error: invalid filename (should not contain ':') "C:\\wslsources\\fedora-latest.tar.gz"

Describe the results you expected:

The container is exported successfully and the file created.

Additional information you deem important (e.g. issue happens only occasionally):

N/A

Output of podman version:

Client:       Podman Engine
Version:      4.1.1
API Version:  4.1.1
Go Version:   go1.16.15
Git Commit:   f73d8f8875c2be7cd2049094c29aff90b1150241
Built:        Wed Jun 15 15:17:12 2022
OS/Arch:      windows/amd64

Server:       Podman Engine
Version:      4.2.0-rc3
API Version:  4.2.0-rc3
Go Version:   go1.16.15
Built:        Fri Aug  5 22:18:20 2022
OS/Arch:      linux/amd64

Output of podman info:

host:
  arch: amd64
  buildahVersion: 1.27.0-dev
  cgroupControllers: []
  cgroupManager: cgroupfs
  cgroupVersion: v1
  conmon:
    package: conmon-2.1.3-1.fc35.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.3, commit: '
  cpuUtilization:
    idlePercent: 99.58
    systemPercent: 0.12
    userPercent: 0.3
  cpus: 16
  distribution:
    distribution: fedora
    variant: container
    version: "35"
  eventLogger: file
  hostname: leviathanix
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.15.57.1-microsoft-standard-WSL2
  linkmode: dynamic
  logDriver: journald
  memFree: 24032718848
  memTotal: 25204072448
  networkBackend: netavark
  ociRuntime:
    name: crun
    package: crun-1.5-1.fc35.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.5
      commit: 54ebb8ca8bf7e6ddae2eb919f5b82d1d96863dea
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.1.12-2.fc35.x86_64
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 0h 14m 12.00s
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
  - quay.io
store:
  configFile: /home/user/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 0
    stopped: 2
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/user/.local/share/containers/storage
  graphRootAllocated: 1081101176832
  graphRootUsed: 1039216640
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 2
  runRoot: /run/user/1000/containers
  volumePath: /home/user/.local/share/containers/storage/volumes
version:
  APIVersion: 4.2.0-rc3
  Built: 1659730700
  BuiltTime: Fri Aug  5 22:18:20 2022
  GitCommit: ""
  GoVersion: go1.16.15
  Os: linux
  OsArch: linux/amd64
  Version: 4.2.0-rc3

Package info (e.g. output of rpm -q podman or apt list podman):

N/A -> using the default podman machine setup.

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):
Podman on Windows using WSL2

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 9, 2022
@github-actions github-actions bot added remote Problem is in podman-remote windows issue/bug on Windows labels Aug 9, 2022
@mheon
Copy link
Member

mheon commented Aug 19, 2022

@n1hility PTAL

@baude
Copy link
Member

baude commented Aug 22, 2022

@mheon this really has nothing to do with machine (i think). we should look at it. ill poke it now

@n1hility
Copy link
Member

Yeah, this is probably just a path validation portability issue. Sorry I had not had time to look at it. I have a full plate atm. Thanks for taking a look @baude

@n1hility
Copy link
Member

(BTW promise as soon as I finish this major win installer revamp, I will dive into my backlog)

baude added a commit to baude/podman that referenced this issue Aug 24, 2022
the `podman save` command was failing on windows due to the use of a
colon between the drive letter and first directory.  the check was
intended for Linux and not windows.

Fixes containers#15247

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <[email protected]>
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/podman that referenced this issue Aug 29, 2022
the `podman save` command was failing on windows due to the use of a
colon between the drive letter and first directory.  the check was
intended for Linux and not windows.

Fixes containers#15247

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <[email protected]>
mheon pushed a commit to mheon/libpod that referenced this issue Sep 6, 2022
the `podman save` command was failing on windows due to the use of a
colon between the drive letter and first directory.  the check was
intended for Linux and not windows.

Fixes containers#15247

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 18, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. remote Problem is in podman-remote windows issue/bug on Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants