
This commit puts the ha-test-suite under the tools directory instead of having it downloaded from the outside (originally it was available at the link https://github.com/rscarazz/tripleo-director-ha-test-suite. At code level now the suite is copied directly from the local path tools/ha-test-suite and the executable now is ha-test-suite.sh. Change-Id: I087bc28a0afa3ede9b2fb698892b8306f56790a2
154 lines
7.5 KiB
YAML
154 lines
7.5 KiB
YAML
---
|
|
- name: Creating the environment file on undercloud
|
|
template:
|
|
src: "{{ environment_file }}"
|
|
dest: "{{ working_dir }}/environment"
|
|
mode: 0600
|
|
|
|
- name: Load the workarounds script on the undercloud
|
|
template:
|
|
src: "{{ workarounds_script }}"
|
|
dest: "{{ working_dir }}/workarounds.sh"
|
|
mode: 0755
|
|
when: apply_workarounds
|
|
|
|
- name: Execute workarounds script on the undercloud
|
|
shell: >
|
|
"{{ working_dir }}/workarounds.sh"
|
|
when: apply_workarounds
|
|
|
|
- name: Copy ha-test-suite on undercloud and controllers
|
|
shell: >
|
|
/usr/bin/rsync --delay-updates -F --compress --archive -e 'ssh -F {{ local_working_dir }}/ssh.config.ansible' {{ local_working_dir }}/tripleo-quickstart-utils/tools/ha-test-suite {{ item }}:
|
|
delegate_to: "localhost"
|
|
with_items:
|
|
- "{{ groups['controller'] }}"
|
|
- "undercloud"
|
|
|
|
- name: Include test sequence depending on release
|
|
include_vars:
|
|
dir: "vars"
|
|
files_matching: "test_list_{{ release }}.yml"
|
|
|
|
- name: Create directory on the undercloud to store test results
|
|
file: path={{ validate_ha_logs_dir }} state=directory
|
|
|
|
# Test: failed actions
|
|
- block:
|
|
- name: HA test - Failed actions (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_check-failed-actions
|
|
register: test_ha_failed_actions_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_failed_actions_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_failed_actions_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_failed_actions_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_failed_actions_stderr.log"
|
|
when: test_ha_failed_actions|bool
|
|
|
|
# Test: Master/Slave
|
|
- block:
|
|
- name: HA test - Master/Slave core resource stop and start (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_master-slave -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_master-slave
|
|
register: test_ha_master_slave_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_master_slave_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_master_slave_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_master_slave_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_master_slave_stderr.log"
|
|
when: test_ha_master_slave|bool
|
|
|
|
# Test: Keystone stop
|
|
- block:
|
|
- name: HA test Keystone stop (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_keystone-constraint-removal -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_keystone-constraint-removal
|
|
register: test_ha_keystone_stop_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_keystone_stop_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_stop_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_keystone_stop_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_stop_stderr.log"
|
|
when: test_ha_keystone_stop|bool
|
|
|
|
# Test: Keystone removal
|
|
- block:
|
|
- name: HA test Keystone removal (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_keystone-constraint-removal -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_keystone-constraint-removal
|
|
register: test_ha_keystone_constraint_removal_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_keystone_constraint_removal_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_constraint_removal_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_keystone_constraint_removal_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_keystone_constraint_removal_stderr.log"
|
|
when: test_ha_keystone_constraint_removal|bool
|
|
|
|
# Test: NG A
|
|
- block:
|
|
- name: HA test NG A (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_pacemaker-light-a -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_pacemaker-light
|
|
register: test_ha_ng_a_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_a_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_a_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_a_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_a_stderr.log"
|
|
when: test_ha_ng_a|bool
|
|
|
|
# Test: NG B
|
|
- block:
|
|
- name: HA test NG B (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_pacemaker-light-b -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_pacemaker-light
|
|
register: test_ha_ng_b_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_b_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_b_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_b_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_b_stderr.log"
|
|
when: test_ha_ng_b|bool
|
|
|
|
# Test: NG C
|
|
- block:
|
|
- name: HA test NG C (overcloud)
|
|
delegate_to: overcloud-controller-0
|
|
shell: >
|
|
{{ overcloud_working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ overcloud_working_dir }}/ha-test-suite/test/test_pacemaker-light-c -r {{ overcloud_working_dir }}/ha-test-suite/recovery/recovery_pacemaker-light
|
|
register: test_ha_ng_c_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_c_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_c_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_ng_c_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_ng_c_stderr.log"
|
|
when: test_ha_ng_c|bool
|
|
|
|
# Test: Instance deployment
|
|
- block:
|
|
- name: HA Test instance deploy on the overcloud (undercloud)
|
|
shell: >
|
|
{{ working_dir }}/ha-test-suite/ha-test-suite.sh -t {{ working_dir }}/ha-test-suite/test/test_instance-creation -r {{ working_dir }}/ha-test-suite/recovery/recovery_instance-creation -u
|
|
register: test_ha_instance_cmd
|
|
always:
|
|
- name: copy stdout test result to undercloud and check command
|
|
copy: content="{{ test_ha_instance_cmd.stdout }}" dest="{{ validate_ha_logs_dir }}/test_ha_instance_stdout.log"
|
|
rescue:
|
|
- name: copy stderr test result to undercloud and check command
|
|
copy: content="{{ test_ha_instance_cmd.stderr }}" dest="{{ validate_ha_logs_dir }}/test_ha_instance_stderr.log"
|
|
when: test_ha_instance|bool
|