Skip to content

Commit 3b525c1

Browse files
authored
Merge pull request #5 from NVIDIA/fix_tuning3
fix(tuning): ulimit check was broken along with readme example
2 parents 519d63f + 240ed97 commit 3b525c1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

tuning/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Use main reboot interrupt for the first apply.
3838
Specify different interrupts for the configmap interrupts to apply a more limited one depending on which one changes.
3939
```yaml
4040
tuning:
41-
version: 1.0.0
41+
version: 1.1.3
4242
image: ghcr.io/nvidia/skyhook-packages/tuning
4343
interrupt:
4444
type: reboot
@@ -60,14 +60,14 @@ tuning:
6060
vm.max_map_count=262144
6161
vm.min_free_kbytes=65536
6262
ulimit.conf: |-
63-
memlock: 128
64-
fsize: 1000
63+
memlock=128
64+
fsize=1000
6565
```
6666
6767
Update just sysctl
6868
```yaml
6969
tuning:
70-
version: 1.0.0
70+
version: 1.1.3
7171
image: ghcr.io/nvidia/skyhook-packages/tuning
7272
interrupt:
7373
type: restart_all_services
@@ -83,7 +83,7 @@ tuning:
8383
Update containerd stack size
8484
```yaml
8585
tuning:
86-
version: 1.0.0
86+
version: 1.1.3
8787
image: ghcr.io/nvidia/skyhook-packages/tuning
8888
interrupt:
8989
type: service

tuning/skyhook_dir/update_settings_check.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ fi
4747
if [ -f ${SKYHOOK_DIR}/configmaps/ulimit.conf ]; then
4848
while IFS= read -r line
4949
do
50-
if [ $(grep -c "${line}" /etc/security/limits.d/999-${package_name}-tuning.conf) -eq 0 ]; then
50+
name=$(echo $line | cut -f 1 -d =)
51+
value=$(echo $line | cut -f 2 -d =)
52+
if [ $(grep -c "hard ${name} ${value}" /etc/security/limits.d/999-${package_name}-tuning.conf) -eq 0 ]; then
5153
failures=$(printf "%s\n%s" "$failures" "No ${line} setting in /etc/security/limits.d/999-${package_name}-tuning.conf")
5254
fi
5355
done <<< $(cat ${SKYHOOK_DIR}/configmaps/ulimit.conf)

0 commit comments

Comments
 (0)