Merge "Make validation HA tests atomic"
commit
b3be924765
|
@ -1,12 +1,12 @@
|
|||
ansible-role-tripleo-overcloud-validate-ha
|
||||
==========================================
|
||||
overcloud-validate-ha
|
||||
=====================
|
||||
|
||||
This role acts on an already deployed tripleo environment, testing all HA related functionalities of the installation.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
This role must be used with a deployed TripleO environment, so you'll need a working directory of tripleo-quickstart with this files:
|
||||
This role must be used with a deployed TripleO environment, so you'll need a working directory of tripleo-quickstart with these files:
|
||||
|
||||
- **hosts**: which will contain all the hosts used in the deployment;
|
||||
- **ssh.config.ansible**: which will have all the ssh data to connect to the undercloud and all the overcloud nodes;
|
||||
|
@ -27,7 +27,6 @@ Quickstart can be invoked like this:
|
|||
--retain-inventory \
|
||||
--playbook overcloud-validate-ha.yml \
|
||||
--working-dir /path/to/workdir \
|
||||
--requirements /path/to/quickstart-extras-requirements.txt \
|
||||
--config /path/to/config.yml \
|
||||
--release <RELEASE> \
|
||||
--tags all \
|
||||
|
@ -38,33 +37,49 @@ Basically this command:
|
|||
- **Keeps** existing data on the repo (it's the most important one)
|
||||
- Uses the *overcloud-validate-ha.yml* playbook
|
||||
- Uses the same custom workdir where quickstart was first deployed
|
||||
- Get all the extra requirements
|
||||
- Select the specific config file (which must contain the floating network data)
|
||||
- Specifies the release (liberty, mitaka, newton, or “master” for ocata)
|
||||
- Specifies the release (mitaka, newton, or “master” for ocata)
|
||||
- Performs all the tasks in the playbook overcloud-validate-ha.yml
|
||||
- Starts the installation on virthost
|
||||
|
||||
**Important note**
|
||||
|
||||
If the role is called by itself, so not in the same playbook that already deploys the environment (see [baremetal-undercloud-validate-ha.yml](https://github.com/redhat-openstack/ansible-role-tripleo-baremetal-undercloud/blob/master/playbooks/baremetal-undercloud-validate-ha.yml), you need to export *ANSIBLE_SSH_ARGS* with the path of the *ssh.config.ansible* file, like this:
|
||||
If the role is called by itself, so not in the same playbook that already deploys the environment (see [baremetal-undercloud-validate-ha.yml](https://github.com/openstack/tripleo-quickstart-extras/blob/master/playbooks/baremetal-undercloud-validate-ha.yml), you need to export *ANSIBLE_SSH_ARGS* with the path of the *ssh.config.ansible* file, like this:
|
||||
|
||||
export ANSIBLE_SSH_ARGS="-F /path/to/quickstart/workdir/ssh.config.ansible"
|
||||
|
||||
HA tests
|
||||
--------
|
||||
|
||||
By default these tests are performed per version:
|
||||
Each test is associated to a global variable that, if true, makes the test happen. Tests are grouped and performed by default depending on the OpenStack release.
|
||||
This is the list of the supported variables, with test description and name of the release on which test is performed:
|
||||
|
||||
- Test: Look for failed actions (**all**)
|
||||
- Test: Stop master slave resources (galera and redis), all the resources should come down (**all**)
|
||||
- Test: Stop keystone resource (by stopping httpd), check no other resource is stopped (**mitaka**, **osp9**)
|
||||
- Test: next generation cluster checks (**newton**):
|
||||
- Test: Stop every systemd resource, stop Galera and Rabbitmq, Start every systemd resource
|
||||
- Test: Stop Galera and Rabbitmq, stop every systemd resource, Start every systemd resource
|
||||
- Test: Stop Galera and Rabbitmq, wait 20 minutes to see if something fails
|
||||
- Test: Instance deployment (**all**)
|
||||
- **test_ha_failed_actions**: Look for failed actions (**all**)
|
||||
- **test_ha_master_slave**: Stop master slave resources (galera and redis), all the resources should come down (**all**)
|
||||
- **test_ha_keystone_constraint_removal**: Stop keystone resource (by stopping httpd), check no other resource is stopped (**mitaka**)
|
||||
- **Test: next generation cluster checks (**newton**):
|
||||
- **test_ha_ng_a**: Stop every systemd resource, stop Galera and Rabbitmq, Start every systemd resource
|
||||
- **test_ha_ng_b**: Stop Galera and Rabbitmq, stop every systemd resource, Start every systemd resource
|
||||
- **test_ha_ng_c**: Stop Galera and Rabbitmq, wait 20 minutes to see if something fails
|
||||
- **test_ha_instance**: Instance deployment (**all**)
|
||||
|
||||
Tests are performed using an external application named [tripleo-director-ha-test-suite](https://github.com/rscarazz/tripleo-director-ha-test-suite).
|
||||
It is also possible to omit (or add) tests not made for the specific release, using the above vars, like in this example:
|
||||
|
||||
./quickstart.sh \
|
||||
--retain-inventory \
|
||||
--ansible-debug \
|
||||
--no-clone \
|
||||
--playbook overcloud-validate-ha.yml \
|
||||
--working-dir /path/to/workdir/ \
|
||||
--config /path/to/config.yml \
|
||||
--extra-vars test_ha_failed_actions=false \
|
||||
--extra-vars test_ha_ng_a=true \
|
||||
--release mitaka \
|
||||
--tags all \
|
||||
<VIRTHOST>
|
||||
|
||||
In this case we will not check for failed actions (which is test that otherwise will be done in mitaka) and we will force the execution of the "ng_a" test described earlier, which is originally executed just in newton versions or above.
|
||||
|
||||
All tests are performed using an external application named [tripleo-director-ha-test-suite](https://github.com/rscarazz/tripleo-director-ha-test-suite).
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
@ -78,7 +93,7 @@ The main playbook couldn't be simpler:
|
|||
roles:
|
||||
- tripleo-overcloud-validate-ha
|
||||
|
||||
But it could also be used at the end of a deployment, like in this file [baremetal-undercloud-validate-ha.yml](https://github.com/redhat-openstack/ansible-role-tripleo-baremetal-undercloud/blob/master/playbooks/baremetal-undercloud-validate-ha.yml).
|
||||
But it could also be used at the end of a deployment, like in this file [baremetal-undercloud-validate-ha.yml](https://github.com/openstack/tripleo-quickstart-extras/blob/master/playbooks/baremetal-undercloud-validate-ha.yml).
|
||||
|
||||
License
|
||||
-------
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
---
|
||||
# tasks file for ansible-role-tripleo-overcloud-validate-ha
|
||||
|
||||
- name: Creating the environment file on undercloud
|
||||
delegate_to: undercloud
|
||||
template:
|
||||
|
@ -31,41 +29,49 @@
|
|||
- "undercloud"
|
||||
- "{{ groups['controller'] }}"
|
||||
|
||||
- name: Include test sequence depending on release
|
||||
include_vars:
|
||||
dir: "vars"
|
||||
files_matching: "test_list_{{ release }}.yml"
|
||||
|
||||
- name: HA test failed actions (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_check-failed-actions > {{ overcloud_working_dir }}/test_ha_failed-actions.log 2>&1
|
||||
when: test_ha_failed_actions|bool
|
||||
|
||||
- name: HA test Master/Slave core resource stop and start (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_master-slave -r {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_master-slave > {{ overcloud_working_dir }}/test_ha_master-slave.log 2>&1
|
||||
when: test_ha_master_slave|bool
|
||||
|
||||
- name: HA test Keystone removal (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_keystone-constraint-removal -r {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_keystone-constraint-removal > {{ overcloud_working_dir }}/test_ha_keystone-constraint-removal.log 2>&1
|
||||
when: release == "mitaka"
|
||||
when: test_ha_keystone_constraint_removal|bool
|
||||
|
||||
- name: HA test NG A (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_pacemaker-light-a -r {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_pacemaker-light > {{ overcloud_working_dir }}/test_ha_ng-a.log 2>&1
|
||||
when: release == "newton"
|
||||
when: test_ha_ng_a|bool
|
||||
|
||||
- name: HA test NG B (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_pacemaker-light-b -r {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_pacemaker-light > {{ overcloud_working_dir }}/test_ha_ng-b.log 2>&1
|
||||
when: release == "newton"
|
||||
when: test_ha_ng_b|bool
|
||||
|
||||
- name: HA test NG C (overcloud)
|
||||
delegate_to: overcloud-controller-0
|
||||
shell: >
|
||||
{{ overcloud_working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/test/test_pacemaker-light-c -r {{ overcloud_working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_pacemaker-light > {{ overcloud_working_dir }}/test_ha_ng-c.log 2>&1
|
||||
when: release == "newton"
|
||||
when: test_ha_ng_c|bool
|
||||
|
||||
- name: HA Test instance deploy on the overcloud (undercloud)
|
||||
delegate_to: undercloud
|
||||
shell: >
|
||||
{{ working_dir }}/tripleo-director-ha-test-suite/TD-ha-test-suite.sh -t {{ working_dir }}/tripleo-director-ha-test-suite/test/test_instance-creation -r {{ working_dir }}/tripleo-director-ha-test-suite/recovery/recovery_instance-creation -u > {{ working_dir }}/test_ha_instance.log 2>&1
|
||||
when: test_ha_instance|bool
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
test_list_ocata.yml
|
|
@ -0,0 +1,7 @@
|
|||
test_ha_failed_actions: true
|
||||
test_ha_master_slave: true
|
||||
test_ha_keystone_constraint_removal: true
|
||||
test_ha_ng_a: false
|
||||
test_ha_ng_b: false
|
||||
test_ha_ng_c: false
|
||||
test_ha_instance: true
|
|
@ -0,0 +1,7 @@
|
|||
test_ha_failed_actions: true
|
||||
test_ha_master_slave: true
|
||||
test_ha_keystone_constraint_removal: false
|
||||
test_ha_ng_a: true
|
||||
test_ha_ng_b: true
|
||||
test_ha_ng_c: true
|
||||
test_ha_instance: true
|
|
@ -0,0 +1,7 @@
|
|||
test_ha_failed_actions: true
|
||||
test_ha_master_slave: true
|
||||
test_ha_keystone_constraint_removal: false
|
||||
test_ha_ng_a: true
|
||||
test_ha_ng_b: true
|
||||
test_ha_ng_c: true
|
||||
test_ha_instance: true
|
Loading…
Reference in New Issue