Skip to content

Commit

Permalink
fix: set sysctl settings for fs.inotify (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
supershal authored Aug 14, 2024
1 parent 9800bf5 commit aa0c060
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ansible/group_vars/all/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ nvidia_runfile_installer_url: "https://download.nvidia.com/XFree86/Linux-x86_64/
suse_packagehub_product: PackageHub/{{ ansible_distribution_version }}/{{ ansible_architecture }}

pinned_debs: []

sysctl_conf_file: >-
{{ '/etc/sysctl.d/99-sysctl.conf' if ansible_os_family in ['Common Base Linux Mariner', 'Flatcar', 'Microsoft Azure Linux', 'VMware Photon OS']
else '/etc/sysctl.conf' }}
12 changes: 12 additions & 0 deletions ansible/roles/providers/tasks/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,15 @@
packer_builder_type is search('vmware') or
packer_builder_type is search('vsphere')) and
ansible_os_family != "Flatcar"

- name: Set and persist kernel params
ansible.posix.sysctl:
name: "{{ item.param }}"
value: "{{ item.val }}"
state: present
sysctl_set: true
sysctl_file: "{{ sysctl_conf_file }}"
reload: true
loop:
- { param: fs.inotify.max_user_instances, val: 8192 }
- { param: fs.inotify.max_user_watches, val: 524288 }

0 comments on commit aa0c060

Please sign in to comment.