devstack/playbooks/post.yaml
Dan Smith c2772c2984 Gather performance data after tempest
This makes us gather a bunch of consistent statistics after we run
tempest that can be use to measure the impact of a given change. These
are stable metrics such as "number of DB queries made" and "how much
memory is each service using after a tempest run."

Note that this will always run after devstack to generate the JSON
file, but there are two things that control its completeness:

 - MYSQL_GATHER_PERFORMANCE must be enabled to get per-db stats
 - Unless tls-proxy is enabled, we will only get API stats for keystone

Change-Id: Ie3b1504256dc1c9c6b59634e86fa98494bcb07b1
2022-04-20 13:07:22 -07:00

36 lines
1.5 KiB
YAML

- hosts: all
become: True
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
- name: Check if a tempest log exits
stat:
path: "{{ devstack_conf_dir }}/tempest.log"
register: tempest_log
- name: Link post-devstack tempest.log
file:
src: "{{ devstack_conf_dir }}/tempest.log"
dest: "{{ stage_dir }}/verify_tempest_conf.log"
state: hard
when: tempest_log.stat.exists
roles:
- export-devstack-journal
- apache-logs-conf
# This should run as early as possible to make sure we don't skew
# the post-tempest results with other activities.
- capture-performance-data
- devstack-project-conf
# capture-system-logs should be the last role before stage-output
- capture-system-logs
- role: stage-output
# NOTE(andreaf) We need fetch-devstack-log-dir only as long as the base job
# starts pulling logs for us from {{ ansible_user_dir }}/logs.
# Meanwhile we already store things in ansible_user_dir and use
# fetch-devstack-log-dir setting devstack_base_dir
- role: fetch-devstack-log-dir
devstack_base_dir: "{{ ansible_user_dir }}"