Staging instance, all changes can be removed at any time

Skip to content

Configure vm.max_map_count for specific workload like elasticsearch

It's spefically set for staging nodes for now. It needs to be set to a minimal of 262144 as a tryout elasticsearch will run there.

That won't impact much the production nodes even if it's set there.

octo-diff
$SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff rancher-node-staging-rke2-worker1.internal.staging.swh.network
...
*** Running octocatalog-diff on host rancher-node-staging-rke2-worker1.internal.staging.swh.network
I, [2023-03-01T11:41:30.217470 #1834099]  INFO -- : Catalogs compiled for rancher-node-staging-rke2-worker1.internal.staging.swh.network
I, [2023-03-01T11:41:30.496878 #1834099]  INFO -- : Diffs computed for rancher-node-staging-rke2-worker1.internal.staging.swh.network
diff origin/production/rancher-node-staging-rke2-worker1.internal.staging.swh.network current/rancher-node-staging-rke2-worker1.internal.staging.swh.network
*******************************************
+ Exec[enforce-sysctl-value-vm.max_map_count] =>
   parameters =>
     "command": "/sbin/sysctl -w vm.max_map_count=262144",
     "unless": "/usr/bin/test \"$(/sbin/sysctl -n vm.max_map_count)\" = 262144"
*******************************************
+ Exec[sysctl-vm.max_map_count] =>
   parameters =>
     "command": "sysctl -p /etc/sysctl.d/vm.max_map_count.conf",
     "path": [
       "/usr/sbin",
       "/sbin",
       "/usr/bin",
       "/bin"
     ],
     "refreshonly": true
*******************************************
+ Exec[update-sysctl.conf-vm.max_map_count] =>
   parameters =>
     "command": "sed -i -e 's#^vm.max_map_count *=.*#vm.max_map_count = 262144#' ...
     "onlyif": "grep -E '^vm.max_map_count *=' /etc/sysctl.conf",
     "path": [
       "/usr/sbin",
       "/sbin",
       "/usr/bin",
       "/bin"
     ],
     "refreshonly": true
*******************************************
+ File[/etc/sysctl.d/99-sysctl.conf] =>
   parameters =>
     "ensure": "link",
     "group": "root",
     "owner": "root",
     "target": "../sysctl.conf"
*******************************************
+ File[/etc/sysctl.d/vm.max_map_count.conf] =>
   parameters =>
     "content": "vm.max_map_count = 262144\n",
     "group": "root",
     "mode": "0644",
     "notify": [
       "Exec[sysctl-vm.max_map_count]",
       "Exec[update-sysctl.conf-vm.max_map_count]"
     ],
     "owner": "root"
*******************************************
+ File[/etc/sysctl.d] =>
   parameters =>
     "ensure": "directory",
     "group": "root",
     "mode": "0755",
     "owner": "root",
     "purge": false,
     "recurse": false
*******************************************
+ Sysctl[vm.max_map_count] =>
   parameters =>
     "enforce": true,
     "suffix": ".conf",
     "value": "262144"
*******************************************
*** End octocatalog-diff on rancher-node-staging-rke2-worker1.internal.staging.swh.network

Refs. swh/infra/sysadm-environment#4524 (closed)

Edited by Antoine R. Dumont

Merge request reports

Loading