Add automatic restart for memcached
This patch ensures that systemd will restart memcached in case of
failure or if the process is manually killed.
Closes-Bug: 1659954
Change-Id: I6782320bf429cde17dff00401e7f136cfc979cee
(cherry picked from commit 4ec27e6874
)
This commit is contained in:
parent
8a644cd539
commit
53e845e54e
|
@ -61,6 +61,14 @@
|
|||
- ansible_service_mgr == 'systemd'
|
||||
notify: Restart memcached
|
||||
|
||||
- name: Add automatic restart on failure
|
||||
template:
|
||||
src: systemd-restart-on-failure.conf.j2
|
||||
dest: "/etc/systemd/system/memcached.service.d/systemd-restart-on-failure.conf"
|
||||
when:
|
||||
- ansible_service_mgr == 'systemd'
|
||||
notify: Restart memcached
|
||||
|
||||
- name: Apply resource limits (systemd)
|
||||
template:
|
||||
src: "limits.conf.j2"
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# {{ ansible_managed }}
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=2
|
Loading…
Reference in New Issue