Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE OpenStack Cloud 8

26 Cloud Verification Edit source

Once you have completed your cloud deployment, these are some of the common post-installation tasks you may need to perform to verify your cloud installation.

26.1 API Verification Edit source

SUSE OpenStack Cloud 8 provides a tool, Tempest, that you can use to verify that your cloud deployment completed successfully:

26.1.1 Prerequisites Edit source

The verification tests rely on you having an external network setup and a cloud image in your image (Glance) repository. Run the following playbook to configure your cloud:

cd ~/scratch/ansible/next/ardana/ansible
ansible-playbook -i hosts/verb_hosts ardana-cloud-configure.yml
Note
Note

In SUSE OpenStack Cloud 8, the EXT_NET_CIDR setting for the external network is now specified in the input model - see Book “Planning an Installation with Cloud Lifecycle Manager”, Chapter 6 “Configuration Objects”, Section 6.16 “Configuration Data”, Section 6.16.2 “Neutron Configuration Data”, Section 6.16.2.2 “neutron-external-networks”.

26.1.2 Tempest Integration Tests Edit source

Tempest is a set of integration tests for OpenStack API validation, scenarios, and other specific tests to be run against a live OpenStack cluster. In SUSE OpenStack Cloud 8, Tempest has been modeled as a service and this gives you the ability to locate Tempest anywhere in the cloud. It is recommended that you install Tempest on your Cloud Lifecycle Manager node - that is where it resides by default in a new installation.

A version of the upstream Tempest integration tests is pre-deployed on the Cloud Lifecycle Manager node. For details on what Tempest is testing, you can check the contents of this file on your Cloud Lifecycle Manager:

/opt/stack/tempest/run_filters/ci.txt

You can use these embedded tests to verify if the deployed cloud is functional.

For more information on running Tempest tests, see Tempest - The OpenStack Integration Test Suite.

Important
Important

Running these tests requires access to the deployed cloud's identity admin credentials

Tempest creates and deletes test accounts and test resources for test purposes.

In certain cases Tempest might fail to clean-up some of test resources after a test is complete, for example in case of failed tests.

26.1.3 Running the Tests Edit source

To run the default set of Tempest tests:

  1. Log in to the Cloud Lifecycle Manager.

  2. Ensure you can access your cloud:

    cd ~/scratch/ansible/next/ardana/ansible
    ansible-playbook -i hosts/verb_hosts cloud-client-setup.yml
    source /etc/environment
  3. Run the tests:

    cd ~/scratch/ansible/next/ardana/ansible
    ansible-playbook -i hosts/verb_hosts tempest-run.yml

Optionally, you can Section 26.1.5, “Customizing the Test Run”.

26.1.4 Viewing Test Results Edit source

Tempest is deployed under /opt/stack/tempest. Test results are written in a log file in the following directory:

/opt/stack/tempest/logs

A detailed log file is written to:

/opt/stack/tempest/tempest.log

The results are also stored in the testrepository database.

To access the results after the run:

  1. Log in to the Cloud Lifecycle Manager.

  2. Change to the tempest directory and list the test results:

    cd /opt/stack/tempest
    ./venv/bin/testr last
Important
Important

If you encounter an error saying "local variable 'run_subunit_content' referenced before assignment", you may need to log in as the tempest user to run this command. This is due to a known issue reported at https://bugs.launchpad.net/testrepository/+bug/1348970.

See Test Repository Users Manual for more details on how to manage the test result repository.

26.1.6 Run Tests for Specific Services and Exclude Specific Features Edit source

Tempest allows you to test specific services and features using the tempest.conf configuration file.

A working configuration file with inline documentation is deployed under /opt/stack/tempest/etc/.

To use this, follow these steps:

  1. Log in to the Cloud Lifecycle Manager.

  2. Edit the /opt/stack/tempest/configs/tempest_region0.conf file.

  3. To test specific service, edit the [service_available] section and clear the comment character # and set a line to true to test that service or false to not test that service.

    cinder = true
    neutron = false
  4. To test specific features, edit any of the *_feature_enabled sections to enable or disable tests on specific features of a service.

    [volume-feature-enabled]
    [compute-feature-enabled]
    [identity-feature-enabled]
    [image-feature-enabled]
    [network-feature-enabled]
    [object-storage-feature-enabled]
    #Is the v2 identity API enabled (boolean value)
    api_v2 = true
    #Is the v3 identity API enabled (boolean value)
    api_v3 = false
  5. Then run tests normally

26.1.7 Run Tests Matching a Series of White and Blacklists Edit source

You can run tests against specific scenarios by editing or creating a run filter file.

Run filter files are deployed under /opt/stack/tempest/run_filters.

Use run filters to whitelist or blacklist specific tests or groups of tests:

  • lines starting with # or empty are ignored

  • lines starting with + are whitelisted

  • lines starting with - are blacklisted

  • lines not matching any of the above conditions are blacklisted

If whitelist is empty, all available tests are fed to blacklist. If blacklist is empty, all tests from whitelist are returned.

Whitelist is applied first. The blacklist is executed against the set of tests returned by the whitelist.

To run whitelist and blacklist tests:

  1. Log in to the Cloud Lifecycle Manager.

  2. Make sure you can access the cloud:

    cd ~/scratch/ansible/next/ardana/ansible
    ansible-playbook -i hosts/verb_hosts cloud-client-setup.yml
    source /etc/environment
  3. Run the tests:

    cd ~/scratch/ansible/next/ardana/ansible
    ansible-playbook -i hosts/verb_hosts tempest-run.yml  -e run_filter <run_filter_name>

Note that the run_filter_name is the name of the run_filter file except for the extension. For instance, to run using the filter from the file /opt/stack/tempest/run_filters/ci.txt, use the following:

ansible-playbook -i hosts/verb_hosts tempest-run.yml -e run_filter=ci

Documentation on the format of white and black-lists is available at:

/opt/stack/tempest/tests2skip.py

Example:

The following entries run API tests, exclude tests that are less relevant for deployment validation, such as negative, admin, cli and third-party (EC2) tests:

+tempest\.api\.*
*[Aa]dmin.*
*[Nn]egative.*
- tempest\.cli.*
- tempest\.thirdparty\.*
Print this page