Setup devstack-early log

The whole devstack log is written into the console output
(job-output.txt) and into devstacklog.txt.

Remove it from job-output and add a devstack-early log file (same as in
legacy job) that includes all the output of stack.sh.

Make sure the log file is pulled into the stage folder so that it will
end up on logs.o.o.

Change-Id: Ia7c1d8fe5cc03d15f455c6e62ebf4a5f6d62ab1f
This commit is contained in:
Andrea Frittoli (andreaf) 2017-12-14 16:08:51 +00:00
parent 71bf831a90
commit b7f8624bed
4 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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.

View File

@ -1 +1,2 @@
devstack_base_dir: /opt/stack
devstack_early_log: /opt/stack/logs/devstack-early.txt

View File

@ -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