diff --git a/playbooks/post.yaml b/playbooks/post.yaml index f5f189ddc5..d99ec10bfe 100644 --- a/playbooks/post.yaml +++ b/playbooks/post.yaml @@ -3,6 +3,7 @@ vars: devstack_log_dir: "{{ devstack_base_dir|default('/opt/stack') }}/logs/" devstack_conf_dir: "{{ devstack_base_dir|default('/opt/stack') }}/devstack/" + devstack_full_log: "{{ devstack_early_log|default('/opt/stack/logs/devstack-early.txt') }}" tasks: # NOTE(andreaf) If the tempest service is enabled, a tempest.log is # generated as part of lib/tempest, as a result of verify_tempest_config @@ -26,6 +27,7 @@ '{{ devstack_log_dir }}/dstat-csv.log': 'logs', '{{ devstack_log_dir }}/devstacklog.txt': 'logs', '{{ devstack_log_dir }}/devstacklog.txt.summary': 'logs', + '{{ devstack_full_log}}': 'logs', '{{ stage_dir }}/verify_tempest_conf.log': 'logs' } extensions_to_txt: - conf diff --git a/roles/run-devstack/README.rst b/roles/run-devstack/README.rst index d77eb15e99..e53f060602 100644 --- a/roles/run-devstack/README.rst +++ b/roles/run-devstack/README.rst @@ -6,3 +6,9 @@ Run devstack :default: /opt/stack The devstack base directory. + +.. zuul:rolevar:: devstack_early_log + :default: /opt/stack/log/devstack-early.txt + + The full devstack log that includes the whatever stack.sh logs before + the LOGFILE variable in local.conf is honoured. diff --git a/roles/run-devstack/defaults/main.yaml b/roles/run-devstack/defaults/main.yaml index fea05c8146..dc4528f692 100644 --- a/roles/run-devstack/defaults/main.yaml +++ b/roles/run-devstack/defaults/main.yaml @@ -1 +1,2 @@ devstack_base_dir: /opt/stack +devstack_early_log: /opt/stack/logs/devstack-early.txt diff --git a/roles/run-devstack/tasks/main.yaml b/roles/run-devstack/tasks/main.yaml index bafebafd65..f53212904a 100644 --- a/roles/run-devstack/tasks/main.yaml +++ b/roles/run-devstack/tasks/main.yaml @@ -1,5 +1,5 @@ - name: Run devstack - command: ./stack.sh + shell: ./stack.sh 2>&1 {{ devstack_early_log }} args: chdir: "{{devstack_base_dir}}/devstack" become: true