Fixed stackviz report for standalone
* When Moving 'stackviz to /var/log/extra/stackviz' task is called, /var/log/extra/stackviz directory does not exist which leads to failure giving no such directory in order to fix that we need to check whether destination exists or not. If not first create it and then move the content and also make sure stackviz-export operation has successfully completed. Change-Id: Ie84c150c74363da25e76bbb234a864a72c6c366a
This commit is contained in:
parent
7a9f9478b8
commit
107a4f913a
@ -30,9 +30,20 @@
|
||||
set -o pipefail
|
||||
source "{{ working_dir }}/tempest/.stackviz/bin/activate"
|
||||
stackviz-export {{ tempest_dstat_opt | default('') }} --env -f {{ working_dir }}/tempest/testrepository.subunit {{ working_dir }}/stackviz/data
|
||||
register: stackviz_result
|
||||
args:
|
||||
chdir: "{{ working_dir }}/tempest"
|
||||
|
||||
- name: Moving stackviz to /var/log/extra
|
||||
shell: mv {{ working_dir }}/stackviz/ /var/log/extra/stackviz
|
||||
- name: Ensure /var/log/extra exists
|
||||
file:
|
||||
path: /var/log/extra
|
||||
state: directory
|
||||
mode: 0755
|
||||
become: true
|
||||
|
||||
- name: Moving stackviz to /var/log/extra
|
||||
shell: |
|
||||
set -o pipefail
|
||||
mv {{ working_dir }}/stackviz/ /var/log/extra
|
||||
become: true
|
||||
when: stackviz_result.rc == 0
|
||||
|
Loading…
Reference in New Issue
Block a user