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] Changing disk size externally can affect a distrobox container to throw RLIMIT_NOFILE #827

Closed
3 tasks done
dkvc opened this issue Jun 28, 2023 · 3 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@dkvc
Copy link

dkvc commented Jun 28, 2023

Please, before opening a bug:

  • make sure you've read the documentation.
  • Ensure there isn't already an open issue about this.
  • Ensure there isn't already a closed/resolved issue about this.

Describe the bug
Changing the disk size of home/root partition might affect distrobox to throw a

Error: unable to start container <container-id>: crun: setrlimit `RLIMIT_NOFILE`: Operation not permitted: OCI permission denied

It is possible that changing the size of disk externally might affect SELinux operation.

To Reproduce
Resize the disk of root/home partition using GParted Live or any other live distribution.

Expected behavior
The container should start (distrobox enter) without any issues.

Logs
Run the commands with --verbose and post the log here as a file upload
distrobox_enter_log.txt

Attach also the output of podman logs or docker logs, possibly with --latest flag
podman_logs.txt

Desktop (please complete the following information):

  • Are you using podman or docker? (Podman)
  • Which version or podman or docker? (4.5.1)
  • Which version of distrobox? (1.4.2.1)
  • Which linux distribution are you using? (Fedora 38 Workstation - GNOME 44.1 with SELinux set to default (enforcing))

Additional context
Add any other context about the problem here.

@J3RN
Copy link

J3RN commented Jul 25, 2023

If I had to guess, I'd guess that the limits changed. i.e. if you compare the output of cat /proc/self/limits | grep open files (limit on open files on the host) with podman inspect <container-id> --format '{{ .HostConfig.Ulimits }}' (what the container tries to set the limits to), you will find that they differ.

@dkvc
Copy link
Author

dkvc commented Jul 26, 2023

While I did checked using #755 (comment), I didnt inspect the container. They indeed differ.

podman containers doesn't seem to be affected, but only distrobox containers seem to be affected. Cloning this container and creating an another distrobox container does indeed fix this issue.

@89luca89
Copy link
Owner

89luca89 commented Aug 3, 2023

This has nothing to do with distrobox
Distrobox does nothing special with disks or such, so it is a podman problem

Workaround is cloning the container

@89luca89 89luca89 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants