This commit manages all the stdout and stderr status of each HA validation test. In this way it will be possible to have all the logs related to the tests in one place (on the undercloud) that will be collected by the collect_logs role and so accessible from the external location where the logs will be stored. Change-Id: Ie803a920a17bd2f24ccd89f733781dd7e4d07fdd
|6 years ago|
|defaults||6 years ago|
|meta||6 years ago|
|tasks||6 years ago|
|templates||6 years ago|
|vars||6 years ago|
|README.md||6 years ago|
This role acts on an already deployed tripleo environment, testing all HA related functionalities of the installation.
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;
A config file with a definition for the floating network (which will be used to test HA instances), like this one:
public_physical_network: "floating" floating_ip_cidr: "10.0.0.0/24" public_net_pool_start: "10.0.0.191" public_net_pool_end: "10.0.0.198" public_net_gateway: "10.0.0.254"
Quickstart can be invoked like this:
./quickstart.sh \ --retain-inventory \ --playbook overcloud-validate-ha.yml \ --working-dir /path/to/workdir \ --config /path/to/config.yml \ --release <RELEASE> \ --tags all \ <HOSTNAME or IP>
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
- Select the specific config file (which must contain the floating network data)
- Specifies the release (mitaka, newton, or “master” for ocata)
- Performs all the tasks in the playbook overcloud-validate-ha.yml
If the role is called by itself, so not in the same playbook that already deploys the environment (see 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"
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_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)
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.
The main playbook couldn't be simpler:
--- - name: Validate overcloud HA status hosts: localhost gather_facts: no 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.
Raoul Scarazzini email@example.com