From 39f10b5fe5021e8655e8771ebebdf57474d86b48 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 14 May 2021 08:20:56 -0700 Subject: [PATCH] Fixup small issues on new zuul scheduler This fixes the zuul debug log's logrotate filename. We also increase the rotation count to 30 daily logs for all zuul scheduler zuul processes (this matches the old server). We also create a /var/lib/zuul/backup dir so that status.json backups have a location they can write to. We do this in the base zuul role which means all zuul servers will get this dir. It doesn't currently conflict with any of the cluster members' /var/lib/zuul contents so should be fine. Change-Id: I4709e3c7e542781a65ae24c1f05a32444026fd26 --- playbooks/roles/zuul-scheduler/tasks/main.yaml | 4 +++- playbooks/roles/zuul-web/tasks/main.yaml | 4 ++++ playbooks/roles/zuul/tasks/main.yaml | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/playbooks/roles/zuul-scheduler/tasks/main.yaml b/playbooks/roles/zuul-scheduler/tasks/main.yaml index becbcff55f..c627e911b1 100644 --- a/playbooks/roles/zuul-scheduler/tasks/main.yaml +++ b/playbooks/roles/zuul-scheduler/tasks/main.yaml @@ -40,12 +40,14 @@ name: logrotate vars: logrotate_file_name: /var/log/zuul/zuul.log + logrotate_rotate: 30 - name: Rotate zuul debug logs include_role: name: logrotate vars: - logrotate_file_name: /var/log/zuul/zuul-debug.log + logrotate_file_name: /var/log/zuul/debug.log + logrotate_rotate: 30 - name: Rotate gearman logs include_role: diff --git a/playbooks/roles/zuul-web/tasks/main.yaml b/playbooks/roles/zuul-web/tasks/main.yaml index 7572a8eced..9b393926f7 100644 --- a/playbooks/roles/zuul-web/tasks/main.yaml +++ b/playbooks/roles/zuul-web/tasks/main.yaml @@ -71,24 +71,28 @@ name: logrotate vars: logrotate_file_name: /var/log/zuul/web.log + logrotate_rotate: 30 - name: Rotate web debug logs include_role: name: logrotate vars: logrotate_file_name: /var/log/zuul/web-debug.log + logrotate_rotate: 30 - name: Rotate fingergw logs include_role: name: logrotate vars: logrotate_file_name: /var/log/zuul/fingergw.log + logrotate_rotate: 30 - name: Rotate fingergw debug logs include_role: name: logrotate vars: logrotate_file_name: /var/log/zuul/fingergw-debug.log + logrotate_rotate: 30 - name: Make docker-compose directory file: diff --git a/playbooks/roles/zuul/tasks/main.yaml b/playbooks/roles/zuul/tasks/main.yaml index 1451caff02..be14691195 100644 --- a/playbooks/roles/zuul/tasks/main.yaml +++ b/playbooks/roles/zuul/tasks/main.yaml @@ -97,6 +97,7 @@ - /var/run/zuul - /var/lib/zuul - /var/lib/zuul/ssh + - /var/lib/zuul/backup - name: Write Zuul SSH Key copy: