From b1a039970a24f3531786ff7fa0a06d47788913be Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 27 Mar 2018 08:06:05 -0700 Subject: [PATCH] Add a flag to disable no_log on upload-logs So that it is possible to debug this role, add a flag which disables setting no_log on the synchronize task. Change-Id: Ie433ada5ff6cb15b68f19e8678244af9ce9faa13 Depends-On: https://review.openstack.org/556881 --- roles/upload-logs/README.rst | 8 ++++++++ roles/upload-logs/tasks/main.yaml | 2 +- roles/upload-logs/vars/main.yaml | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/roles/upload-logs/README.rst b/roles/upload-logs/README.rst index 98dcb43f8..e9e51f4ad 100644 --- a/roles/upload-logs/README.rst +++ b/roles/upload-logs/README.rst @@ -13,6 +13,14 @@ This uploads logs to a static webserver using SSH. The root path to the logs on the logserver. +.. zuul:rolevar:: zuul_log_verbose + :default: false + + The synchronize task in this role outputs a lot of information. By + default, no_log is set to avoid overwhelming a reader of the logs. + Set this to true to disable that behavior if it becomes necessary + to debug this role. + .. zuul:rolevar:: zuul_site_upload_logs :default: true diff --git a/roles/upload-logs/tasks/main.yaml b/roles/upload-logs/tasks/main.yaml index 661ce9aec..e10367c87 100644 --- a/roles/upload-logs/tasks/main.yaml +++ b/roles/upload-logs/tasks/main.yaml @@ -29,7 +29,7 @@ rsync_opts: - "--exclude=job-output.txt" - "--exclude=job-output.json" - no_log: true + no_log: "{{ not zuul_log_verbose }}" # After this point there are no more logs - name: gzip console log and json output diff --git a/roles/upload-logs/vars/main.yaml b/roles/upload-logs/vars/main.yaml index 4b6a10130..c3a3be79e 100644 --- a/roles/upload-logs/vars/main.yaml +++ b/roles/upload-logs/vars/main.yaml @@ -1 +1,2 @@ zuul_logserver_root: /srv/static/logs +zuul_log_verbose: false