From 10a171eb188f1b0753c59ca196d4ffb0a418704e Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Mon, 11 Dec 2023 13:07:09 -0600 Subject: [PATCH] Increase the number of inotify instances For TLS test jobs on Ubuntu Jammy when we run dnsmasq on the master node needed for testing we get the error: "failed to create inotify: Too many open files" By default the number of inotify instances on Jammy is 128. We increase this up to 256. Change-Id: I07c8a0f909608b6e44040ffeefc6ab576236c93f --- roles/deploy-env/tasks/common_k8s.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/deploy-env/tasks/common_k8s.yaml b/roles/deploy-env/tasks/common_k8s.yaml index ad222dfde7..530f8ce209 100644 --- a/roles/deploy-env/tasks/common_k8s.yaml +++ b/roles/deploy-env/tasks/common_k8s.yaml @@ -21,6 +21,16 @@ - net.ipv4.ip_forward ignore_errors: true +# This is necessary when we run dnsmasq. +# Otherwise, we get the error: +# failed to create inotify: Too many open files +- name: Configure number of inotify instances + sysctl: + name: "fs.inotify.max_user_instances" + value: "256" + state: present + ignore_errors: true + - name: Remove swapfile from /etc/fstab mount: name: "{{ item }}"