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: open /proc/sys/net/ipv4/ping_group_range with 0.43.0 #723

Closed
b1-luettje opened this issue Aug 12, 2021 · 7 comments
Closed

Error: open /proc/sys/net/ipv4/ping_group_range with 0.43.0 #723

b1-luettje opened this issue Aug 12, 2021 · 7 comments

Comments

@b1-luettje
Copy link

I'm not able to launch any container with port mapping since i upgraded to containers-common 0.43.0, downgrading to 0.42.1 fixes the problem.

$ podman info:

host:
  arch: amd64
  buildahVersion: 1.21.3
  cgroupControllers: []
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.0.29-1
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: 7e6de6678f6ed8a18661e1d5721b81ccee293b9b'
  cpus: 8
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: ...
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 60458
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 60458
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.13.9-zen1-1-zen
  linkmode: dynamic
  memFree: 7743725568
  memTotal: 16420229120
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 0.21-1
    path: /usr/bin/crun
    version: |-
      crun version 0.21
      commit: c4c3cdf2ce408ed44a9e027c618473e6485c635b
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/.../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: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.1.12-1
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.1
  swapFree: 1641017344
  swapTotal: 1641017344
  uptime: 15m 45.77s
registries:
  search:
  - docker.io
store:
  configFile: /home/luettje/.config/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 0
    stopped: 2
  graphDriverName: btrfs
  graphOptions: {}
  graphRoot: /home/luettje/.local/share/containers/storage
  graphStatus:
    Build Version: 'Btrfs v5.13 '
    Library Version: "102"
  imageStore:
    number: 7
  runRoot: /run/user/60458/containers
  volumePath: /home/luettje/.local/share/containers/storage/volumes
version:
  APIVersion: 3.2.3
  Built: 1628285759
  BuiltTime: Fri Aug  6 23:35:59 2021
  GitCommit: 1e6fd46e91b21342f9454cf8105a92b90e398c52
  GoVersion: go1.16.7
  OsArch: linux/amd64
  Version: 3.2.3

With current version:

$ sudo podman run -it --rm -p 8080:8080 alpine
Error: open /proc/sys/net/ipv4/ping_group_range : No such file or directory: OCI runtime attempted to invoke a command that was not found

After downgrading to 0.42.1 everything is fine:

$ sudo podman run -it --rm -p 8080:8080 alpine
/ #

$ pacman -Qi containers-common
Name            : containers-common
Version         : 0.42.1-2
Description     : Configuration files and manpages for containers
Architecture    : any
URL             : https://github.com/containers
Licenses        : Apache
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : podman  skopeo
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 143,35 KiB
Packager        : David Runge <[email protected]>
Build Date      : So 08 Aug 2021 22:56:33 CEST
Install Date    : Do 12 Aug 2021 08:40:23 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature
@b1-luettje
Copy link
Author

/etc/containers/containers.conf is identical to /usr/share/containers/containers.conf

@DDoSolitary
Copy link

DDoSolitary commented Aug 12, 2021

The errors seems to be caused by 62d90f9, which adds spaces around = in the default_sysctls config. The spaces are not striped but made its way to the final openat call and result in the ENOENT error.

Relevant part of strace log:

openat(AT_FDCWD, "/proc/sys", O_RDONLY|O_DIRECTORY) = 8
openat(8, "net/ipv4/ping_group_range ", O_WRONLY) = -1 ENOENT (No such file or directory)

@b1-luettje
Copy link
Author

Correct, once i remove the spaces there are no problems anymore with the current version 👍

@unknowndevQwQ
Copy link
Contributor

I just tested and found that crun and runc do not support sysctl options like net.ipv4.ping_group_range = 0 0, only youki does. But when I enable the ulimit "nofile = 1280:2560" option, I find that podman outputs level=error msg="validating containers config: unrecognized ulimit nofile = 1280:2560: invalid ulimit type: nofile "

Perhaps adding spaces to the equals sign of the sysctl/ulimit option is not what most people expect

@rhatdan
Copy link
Member

rhatdan commented Aug 12, 2021

No one should be shipping /etc/containers/containers.conf by default...

@xatier
Copy link
Contributor

xatier commented Aug 13, 2021

@xatier
Copy link
Contributor

xatier commented Aug 13, 2021

@rhatdan , I added checks for extra spacing in ValidateSysctls, please take a look at containers/podman#11224 .

xatier added a commit to xatier/podman that referenced this issue Aug 13, 2021
This is to catch invalid sysctl configs with extra spacing.

See
containers/common#723 (comment)

Signed-off-by: xatier <[email protected]>
hswong3i added a commit to alvistack/ansible-role-containers_common that referenced this issue Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants