From 681b6db3f3416274c88bd508bf169c06892a387a 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 [NO NEW TESTS NEEDED] Signed-off-by: Giuseppe Scrivano --- pkg/machine/ignition.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go index 4b5bdf521c82..4bb41376e717 100644 --- a/pkg/machine/ignition.go +++ b/pkg/machine/ignition.go @@ -431,6 +431,22 @@ 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{ + 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