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

docker-rootful: Increase inotify limits by default #1179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlosonunez-vmw
Copy link

This resolves #1178.

@carlosonunez-vmw carlosonunez-vmw changed the title Increase inotify limits by default docker-rootful: Increase inotify limits by default Nov 18, 2022
@AkihiroSuda
Copy link
Member

Thanks, but please sign the commit for DCO
https://github.com/apps/dco

(run git commit -a -s --amend, and make sure that the Signed-off-by: NAME <EMAIL> line with your real name is included in the commit message)

# from crash looping.
echo 'fs.inotify.max_user_watches = 524288' >> /etc/sysctl.conf
echo 'fs.inotify.max_user_instances = 512' >> /etc/sysctl.conf
sysctl --system
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replicate this to docker.yaml, podman*.yaml, k8s.yaml, k3s.yaml too?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea!

@carlosonunez-vmw
Copy link
Author

carlosonunez-vmw commented Nov 20, 2022 via email

@afbjorklund
Copy link
Member

afbjorklund commented Nov 20, 2022

Seems needlessly complicated for the k3s and k8s examples, since they would have VMs as nodes (not containers) ?

If I understand correctly, it is only for running containerd-in-docker or containerd-in-podman - as part of "kind"

@AkihiroSuda
Copy link
Member

  • Please sign off the commit for DCO: https://github.com/apps/dco
  • Please squash commits
  • Please consider doing the same for podman*.yaml

This resolves lima-vm#1178 and allows users to create multiple local Kubernetes
clusters through Kind or the Cluster API Docker provider.

Signed-off-by: Carlos Nunez <[email protected]>
@carlosonunez-vmw
Copy link
Author

✅ Please sign off the commit for DCO: https://github.com/apps/dco
✅ Please squash commits
⚠️ Please consider doing the same for podman*.yaml

I'm not sure if Podman needs this treatment, as it uses crun instead of runc which handles nested cgroup mounting differently. This would require additional testing.

Can that be a separate pull request, given that this behavior is known for containerd-based engines?

script: |
#!/bin/bash
# Increase inotify limits to prevent nested Kubernetes control planes
# from crash looping.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed for k3s? If so, it should be needed for k8s.yaml too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, it is only needed for k3d and kind - not for k3s and k8s

@chancez
Copy link
Contributor

chancez commented Dec 8, 2022

Ah this looks great, I've been doing something similar for ages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"too many open files" error upon creating multiple Kind clusters on Lima VMs.
4 participants