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 when running example in README #489

Closed
bobhenkel opened this issue Sep 13, 2020 · 1 comment
Closed

Error when running example in README #489

bobhenkel opened this issue Sep 13, 2020 · 1 comment

Comments

@bobhenkel
Copy link

On the readme it says crun lets you run the following podman run command, but I get an error.

podman --runtime /usr/bin/crun run --rm --memory 4M fedora echo it works
ubuntu@test-ubunt20:~$ podman --runtime /usr/bin/crun run --rm --memory 4M fedora echo it works
Error: opening file `memory.swap.max` for writing: Permission denied: OCI runtime permission denied error

This also occurs if I run the command as root.

root@test-ubunt20:~# podman --runtime /usr/bin/crun run --rm --memory 4M fedora echo it works
Error: opening file `memory.swap.max` for writing: Permission denied: OCI runtime permission denied error
root@test-ubunt20:~#
root@test-ubunt20:~# podman version
Version:      2.0.6
API Version:  1
Go Version:   go1.14.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64
root@test-ubunt20:~# podman info
host:
  arch: amd64
  buildahVersion: 1.15.1
  cgroupVersion: v2
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.20, commit: '
  cpus: 8
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: file
  hostname: test-ubunt20
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.0-37-generic
  linkmode: dynamic
  memFree: 6703575040
  memTotal: 12562845696
  ociRuntime:
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version 0.14.1
      commit: 598ea5e192ca12d4f6378217d3ab1415efeddefa
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 12h 12m 56.29s (Approximately 0.50 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 2
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 1
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.14.2
  OsArch: linux/amd64
  Version: 2.0.6
@bobhenkel
Copy link
Author

I don't really know if this is a crun issue or a podman issue so apologies in advance, but I ended up adding swapaccount=1 and cgroup_enable=memory to my grub config and now I can run the command. Here's the link I ran into that helped me containers/podman#6365 (comment).

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

1 participant