James Parker 1718597200 Pass hostname to NovaServiceManager
Default TripleO deployments utilize compute domain names when looking up
nova service binaries, this lookup does not work when using a compute's
control plane IP address though. To allow the recent change [1] to run
downstream, this commit updates how parameters are passed to the init of
NovaServiceManager. The hostname is passed to NovaServiceManager instead
of the IP address.  During the init the compute's control plane IP
address is determined and passed to its SSHClient. When
NovaServiceManager attempts to access nova services, it uses the
compute's provided hostname now instead of the IP address.

The get_ctlplane_address() function was moved from api.compute.base to
utils, since services.clients now needs to leverage this functionality
as well. All test case calls of get_ctlplane_address() have been updated
to use the new module path. Unit test modules test_base and test_utils
were updated to reflect these changes.

Lastly test cases interfacing with NovaServiceManager have been updated
to store both the compute's hostname as well as it's associated control
plane IP address. Originally these tests only stored the compute's
control plane address.

[1] https://review.opendev.org/#/c/736820/

Change-Id: I4d9330cf8abcb6ba3c0852e6ce3db732e468c6a5
2020-08-19 16:59:16 -04:00
2020-06-19 13:26:58 -04:00
2019-04-02 15:51:24 +00:00
2020-06-13 07:08:00 +02:00
2019-01-27 20:38:15 -05:00
2018-01-10 11:57:05 +00:00
2017-12-12 17:55:00 +01:00
2020-05-03 11:29:45 -04:00

Whitebox Tempest plugin

This repo is a Tempest plugin that contains scenario tests ran against TripleO/Director-based deployments.

Important

This is still a work in progress.

Requirements

The tests assume a TripleO/Director-based deployment with an undercloud and overcloud. The tests will be run from the undercloud therefore Tempest should be installed and configured on the undercloud node. It's assumed that the Unix user running the tests, generally stack, has SSH access to all the compute nodes running in the overcloud.

Most tests have specific hardware requirements. These are documented in the tests themselves and the tests should fast-fail if these hardware requirements are not met. You will require multiple nodes to run these tests and will need to manually specify which test to run on which node. For more information on our plans here, refer to roadmap.

For more information on TripleO/Director, refer to the Red Hat OpenStack Platform documentation.

Install, configure and run

  1. Install the plugin.

    This should be done from source. :

    WORKSPACE=/some/directory
    cd $WORKSPACE
    git clone https://github.com/redhat-openstack/whitebox-tempest-plugin
    sudo pip install whitebox-tempest-plugin
  2. Configure Tempest.

    Add the following lines at the end of your tempest.conf file. These determine how your undercloud node, which is running Tempest, should connect to the compute nodes in the overcloud and vice versa. For example:

    [whitebox]
    hypervisors = compute-0.localdomain:192.168.24.6,compute-1.localdomain:192.168.24.12
    # Only set the following if different from the defaults listed
    # ctlplane_ssh_username = heat-admin
    # ctlplane_ssh_private_key_path = /home/stack/.ssh/id_rsa
    containers = true
    max_compute_nodes = 2 # Some tests depend on there being a single
                          # (available) compute node
  3. Execute the tests. :

    tempest run --regex whitebox_tempest_plugin.

How to add a new test

New tests should be added to the whitebox_tempest_plugin/tests directory.

According to the plugin interface doc, you should mainly import "stable" APIs which usually are:

  • tempest.lib.*
  • tempest.config
  • tempest.test_discover.plugins
  • tempest.common.credentials_factory
  • tempest.clients
  • tempest.test

Importing classes from tempest.api.* could be dangerous since future version of Tempest could break.

Roadmap

The different tests found here all have different hardware requirements, and these requirements often conflict. For example, a test that requires a host without HyperThreading enabled cannot be used for a test that requires HyperThreading. As a result, it's not possible to have one "master configuration" that can be used to run all tests. Instead, different tests must be run on different nodes.

At present, this plugin exists in isolation and the running of individual tests on nodes, along with the configuration of said nodes, remains a manual process. However, the end goal for this project is to be able to kick run this test suite of against N overcloud nodes, where each node has a different hardware configuration and N is the total number of different hardware configurations required (one for real-time, one for SR-IOV, etc.). Each node would have a different profile and host aggregates would likely be used to ensure each test runs on its preferred hardware. To get here, we should probably provide a recipe along with hardware configuration steps.

This being said, the above is way off yet. For now, we're focussed on getting the tests in place so we can stop doing all this stuff by hand.

Description
Tempest plugin for whitebox testing. For testing things not exposed through the REST APIs.
Readme 24 MiB
Languages
Python 98.3%
Shell 1%
Jinja 0.7%