podman icon indicating copy to clipboard operation
podman copied to clipboard

Cannot start containers while offline with pasta

Open ralmachado opened this issue 1 year ago • 7 comments

Issue Description

While using pasta for container networking, and not connected to the internet, podman-run always fails.

Alternatively, using --network=slirp4netns or --network=none works both online and offline.

Steps to reproduce the issue

Steps to reproduce the issue

  1. Disconnect or disable WiFi
  2. Run podman run --rm -it alpine

Describe the results you received

Podman prints the following error

Error: pasta failed with exit code 1:
External interface not usable

Describe the results you expected

Dropped into a shell in an Alpine Linux container

podman info output

host:
  arch: amd64
  buildahVersion: 1.36.0
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.10-1.fc40.x86_64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.10, commit: '
  cpuUtilization:
    idlePercent: 95.97
    systemPercent: 1.38
    userPercent: 2.65
  cpus: 12
  databaseBackend: sqlite
  distribution:
    distribution: fedora
    variant: workstation
    version: "40"
  eventLogger: journald
  freeLocks: 2039
  hostname: sieger
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 524288
      size: 65536
  kernel: 6.9.12-200.fc40.x86_64
  linkmode: dynamic
  logDriver: journald
  memFree: 10122547200
  memTotal: 16075177984
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.11.0-3.fc40.x86_64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.11.0
    package: netavark-1.11.0-3.fc40.x86_64
    path: /usr/libexec/podman/netavark
    version: netavark 1.11.0
  ociRuntime:
    name: crun
    package: crun-1.15-1.fc40.x86_64
    path: /usr/bin/crun
    version: |-
      crun version 1.15
      commit: e6eacaf4034e84185fd8780ac9262bbf57082278
      rundir: /run/user/1000/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^20240726.g57a21d2-1.fc40.x86_64
    version: |
      pasta 0^20240726.g57a21d2-1.fc40.x86_64
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.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: false
    path: /run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  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: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 8589930496
  swapTotal: 8589930496
  uptime: 0h 22m 5.00s
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - docker.io
store:
  configFile: /home/rodrigo/.config/containers/storage.conf
  containerStore:
    number: 7
    paused: 0
    running: 0
    stopped: 7
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/rodrigo/.local/share/containers/storage
  graphRootAllocated: 262021025792
  graphRootUsed: 82049794048
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 63
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/rodrigo/.local/share/containers/storage/volumes
version:
  APIVersion: 5.1.2
  Built: 1720569600
  BuiltTime: Wed Jul 10 01:00:00 2024
  GitCommit: ""
  GoVersion: go1.22.5
  Os: linux
  OsArch: linux/amd64
  Version: 5.1.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

No response

ralmachado avatar Aug 09 '24 17:08 ralmachado

see https://github.com/containers/podman/discussions/22737, this is certainly something we want to address

Luap99 avatar Aug 09 '24 17:08 Luap99

And also https://github.com/containers/podman/issues/22959#issuecomment-2228900989 -- which outlines how we're addressing that. I'm not sure if #22959 or #22737 are duplicated, strictly speaking. We could leave this open as well if you ask me.

sbrivio-rh avatar Aug 09 '24 18:08 sbrivio-rh

I hit this also a few times, spotty train wifi is great at reproducing this :)

ericcurtin avatar Aug 17 '24 15:08 ericcurtin

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

github-actions[bot] avatar Sep 17 '24 00:09 github-actions[bot]

I'm still seeing this in Fedora 40:

~$ podman version
Client:       Podman Engine
Version:      5.2.2
API Version:  5.2.2
Go Version:   go1.22.6
Built:        Wed Aug 21 01:00:00 2024
OS/Arch:      linux/amd64
$ podman run --rm -it vllm/vllm-openai # while offline
Error: pasta failed with exit code 1:
External interface not usable

ericcurtin avatar Sep 23 '24 11:09 ericcurtin

I'm still seeing this in Fedora 40:

Known, I'm still working on this (it's not exactly trivial, see https://github.com/containers/podman/issues/22959#issuecomment-2228900989 and https://pad.passt.top/p/PastaWithoutNetworkConnectivity).

sbrivio-rh avatar Sep 23 '24 18:09 sbrivio-rh

@sbrivio-rh thanks, sorry for the repeated poke, I saw it again yesterday and noticed this issue was going stale... Wanted it to remain non-stale...

ericcurtin avatar Sep 23 '24 18:09 ericcurtin

There is an offline mode now, https://github.com/containers/podman/issues/24614#issuecomment-2504323649

Luap99 avatar Mar 07 '25 17:03 Luap99