From f8c5c52bd770ab85d0c75c27dc81cf9d08891deb Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 4 Sep 2023 13:35:09 +0200 Subject: [PATCH] machine: increase max number of inotify instances increase the number of inotify instances to 524288 instead of using the default value of 128. Closes: https://github.com/containers/podman/issues/19848 Signed-off-by: Giuseppe Scrivano --- pkg/machine/ignition.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index 4b5bdf521c82..15326f628eff 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -431,6 +431,23 @@ Delegate=memory pids cpu io }, }) + // Increase the number of inotify instances. + files = append(files, File{ + Node: Node{ + Group: GetNodeGrp("root"), + Path: "/etc/sysctl.d/10-inotify-instances.conf", + User: GetNodeUsr("root"), + }, + FileEmbedded1: FileEmbedded1{ + Append: nil, + Contents: Resource{ + // TODO this should be fixed for all vmtypes + Source: EncodeDataURLPtr("fs.inotify.max_user_instances=524288\n"), + }, + Mode: IntToPtr(0644), + }, + }) + // Issue #11489: make sure that we can inject a custom registries.conf // file on the system level to force a single search registry. // The remote client does not yet support prompting for short-name