Browse Source

Fix run/restart method for transparent_hugepage

The previous method of doing this could cause redis to try to start up
(via restart) earlier than it should. By using require_in and watch_in,
it should now only start up in the first place once this service has
been started first, and it will also cause redis to restart if it ever
needs to run again in the future.
merge-requests/74/head
Deimos 5 years ago
parent
commit
ff94f095b6
  1. 8
      salt/salt/redis/init.sls

8
salt/salt/redis/init.sls

@ -84,13 +84,17 @@ redis-user:
- require_in:
- service: disable-transparent-hugepage
# enable the "disable transparent hugepage" service, and run it + restart redis if necessary
# enable the "disable transparent hugepage" service and run it
disable-transparent-hugepage:
service.enabled:
- name: transparent_hugepage.service
cmd.run:
- name: systemctl start transparent_hugepage.service && systemctl restart redis.service
- name: systemctl start transparent_hugepage.service
- unless: 'cat /sys/kernel/mm/transparent_hugepage/enabled | grep \\[never\\]'
- require_in:
- service: redis.service
- watch_in:
- service: redis.service
# Set kernel overcommit mode (recommended for Redis)
overcommit-memory:

Loading…
Cancel
Save