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
This commit is contained in:
parent
f55f307156
commit
4ec27e6874
|
@ -71,6 +71,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