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

Podman fails to start container when machine wakes up from sleep #19934

Closed
king-phyte opened this issue Sep 11, 2023 · 4 comments
Closed

Podman fails to start container when machine wakes up from sleep #19934

king-phyte opened this issue Sep 11, 2023 · 4 comments
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. machine remote Problem is in podman-remote stale-issue

Comments

@king-phyte
Copy link

king-phyte commented Sep 11, 2023

Issue Description

On my Macbook Pro M1 (2020), trying to start a container that has already been created with volume mounts fails sometimes. This usually happens after rebooting the machine, but the most recent one is from when it woke up from sleep.
A workaround is to remove the built images, restart podman machine and rebuild the images.

Steps to reproduce the issue

Steps to reproduce the issue

To reproduce the issue, execute podman run with a volume mount, wait for the machine to go to sleep, wake it up and try to start the container.
Note: It does not always throw the error, but rest assured, it does sometimes

  1. podman run -dt --name schooldesk-db -e MYSQL_ROOT_PASSWORD=king -e MYSQL_PASSWORD=king -e MYSQL_USER=king -e MYSQL_DATABASE=schooldesk --userns=keep-id -v "/Users/king/Podman/Volumes/schooldesk-tests:/var/lib/mysql" -p 3307:3306 mysql
  2. Reboot or let the computer go to sleep
  3. podman start schooldesk-db

Describe the results you received

Error: unable to start container "6ac89c1e74e2000113d27c56dd711ee5c74abd478a7543b1b81176b6ae2d3cc7": crun: error stat'ing file `/Users/king/Podman/Volumes/schooldesk`: No such file or directory: OCI runtime attempted to invoke a command that was not found

Describe the results you expected

Describe the results you expected

The container should be started because the volume actually exists.

image

podman info output

If you are unable to run podman info for any reason, please provide the podman version, operating system and its version and the architecture you are running.

host:
  arch: arm64
  buildahVersion: 1.31.2
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.7-2.fc38.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.7, commit: '
  cpuUtilization:
    idlePercent: 98.47
    systemPercent: 0.73
    userPercent: 0.8
  cpus: 1
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: coreos
    version: "38"
  eventLogger: journald
  freeLocks: 2042
  hostname: localhost.localdomain
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
    uidmap:
    - container_id: 0
      host_id: 501
      size: 1
    - container_id: 1
      host_id: 100000
      size: 1000000
  kernel: 6.4.15-200.fc38.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 1554612224
  memTotal: 2048544768
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.7.0-1.fc38.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.7.0
    package: netavark-1.7.0-1.fc38.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.7.0
  ociRuntime:
    name: crun
    package: crun-1.8.7-1.fc38.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.8.7
      commit: 53a9996ce82d1ee818349bdcc64797a1fa0433c4
      rundir: /run/user/501/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20230823.ga7e4bfb-1.fc38.aarch64
    version: |
      pasta 0^20230823.ga7e4bfb-1.fc38.aarch64
      Copyright Red Hat
      GNU Affero GPL version 3 or later <https://www.gnu.org/licenses/agpl-3.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/501/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: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.1-1.fc38.aarch64
    version: |-
      slirp4netns version 1.2.1
      commit: 09e31e92fa3d2a1d3ca261adaeb012c8d75a8194
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 1h 14m 26.00s (Approximately 0.04 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /var/home/core/.config/containers/storage.conf
  containerStore:
    number: 6
    paused: 0
    running: 0
    stopped: 6
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/home/core/.local/share/containers/storage
  graphRootAllocated: 106769133568
  graphRootUsed: 5640859648
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 15
  runRoot: /run/user/501/containers
  transientStore: false
  volumePath: /var/home/core/.local/share/containers/storage/volumes
version:
  APIVersion: 4.6.2
  Built: 1693251554
  BuiltTime: Mon Aug 28 19:39:14 2023
  GitCommit: ""
  GoVersion: go1.20.7
  Os: linux
  OsArch: linux/arm64
  Version: 4.6.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@king-phyte king-phyte added the kind/bug Categorizes issue or PR as related to a bug. label Sep 11, 2023
@github-actions github-actions bot added the remote Problem is in podman-remote label Sep 11, 2023
@Luap99
Copy link
Member

Luap99 commented Sep 12, 2023

This sounds like a duplicate of #15976
You need to stop and start the machine with the podman commands otherwise the mounts are not created.

@Luap99 Luap99 added the machine label Sep 12, 2023
@king-phyte
Copy link
Author

It sounds like its definitely related, although I'm not sure it's a duplicate

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Oct 16, 2023

Since we never heard anything additional, closing.

@rhatdan rhatdan closed this as completed Oct 16, 2023
@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 Jan 15, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2024
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. machine remote Problem is in podman-remote stale-issue
Projects
None yet
Development

No branches or pull requests

3 participants