From 3fc979c19dd1e3e6dac599d04dbed2506931b664 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 1 Oct 2020 14:59:08 -0700 Subject: [PATCH] resultsdb: restart httpd on error We have been getting lots of OOM kills on httpd on resultsdb01. This should at least mitigate it until we can sort out why it's happening. Signed-off-by: Kevin Fenzi --- roles/ci_resultsdb/files/httpd.service | 2 ++ roles/ci_resultsdb/tasks/main.yml | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 roles/ci_resultsdb/files/httpd.service diff --git a/roles/ci_resultsdb/files/httpd.service b/roles/ci_resultsdb/files/httpd.service new file mode 100644 index 0000000000..eedb19cd59 --- /dev/null +++ b/roles/ci_resultsdb/files/httpd.service @@ -0,0 +1,2 @@ +[Service] +Restart=on-failure diff --git a/roles/ci_resultsdb/tasks/main.yml b/roles/ci_resultsdb/tasks/main.yml index e13dbab29c..fdcd116f2f 100644 --- a/roles/ci_resultsdb/tasks/main.yml +++ b/roles/ci_resultsdb/tasks/main.yml @@ -7,6 +7,13 @@ tags: - packages +- name: override httpd service to restart on failure + copy: dest=/etc/systemd/system/httpd.service + src=httpd.service + notify: + - reload systemd + - reload httpd + - name: Create /etc/ci-resultsdb-listener/ file: name=/etc/ci-resultsdb-listener/ state=directory