Commit Graph

92 Commits

Author SHA1 Message Date
Corey Bryant 35c8bdcc67 Increase tempest ssh timeout
Some of the tests that ssh into instances have been timing out
at times. Increase the timeout config for ssh.
2023-11-10 13:17:57 +00:00
Corey Bryant 0fdf38f49f Add tempest confirmation for octavia tests
This sets new tempest config options for octavia, including the setting
of log_user_roles=False, which allows tests to avoid the optional
list_role_assignments call that was resulting in 403 Forbidden for all
octavia tests.
2023-11-06 13:19:57 +00:00
Felipe Reyes 4bffe6c8e5 Merge pull request #1163 from coreycb/tempest-heat
Add new heat_plugin section to tempest.conf
2023-11-03 11:22:30 -03:00
Corey Bryant c16c0f95c7 Clean up [heat_plugin] section 2023-11-03 14:08:52 +00:00
Hemanth Nakkina 82ba0944d5 Remove assertion on number of loadbalancers
Heat charm when configured with traefik-route
can have multiple loadbalancers (for heat-api
and heat-api-cfn).
So remove the assertion in wait_for_traefik on
number of loadbalancers. Check on number of units
against number of servers should be sufficient.
2023-11-03 15:24:12 +05:30
Hemanth Nakkina 6d9d712310 Fix traefik config filename
Traefik config file names are of format
juju_ingress_ingress_<id>_<app>.yaml for
ingress interface. However if traefik_route
interface is used, the file name format
is juju_ingress_traefik-route_<id>_<app>.yamlwq

In tempest tests, wait_for_traefik, change the
filename format to support both ingress and
traefik-route interfaces.
2023-11-03 13:21:06 +05:30
Corey Bryant f1081a860b Add new heat_plugin section to tempest.conf
The heat tepest tests have moved out of tempest proper into a plugin.
This updates the tempest.conf accordingly.
2023-10-31 20:51:34 +00:00
Corey Bryant 19d8fc3db4 tempest: Add serial config
The serial config can be set to True to add the --serial flag to the
tempest run. This appears to be useful with the current state of
serverstack and fixing tests that fail due to "Bad router request:
Router already has a port on subnet <subnet-uuid>."
2023-10-19 13:41:03 -04:00
Liam Young 19ab52b767 Increase number of retires for wait_for_traefik
Recent test runs have shown that the current number of retries is
not enough and traefik has still not updated its config. This PR
increases the number of retries in the hope that it will be
enough.
2023-10-04 14:58:02 +00:00
Liam Young d670a2914c Add tactical work around for traefik
Add tactical work around for traefik readyness. Traefik takes
sometime to process changes to load balancer configuration.
Traefik has an api but it is turned off by default and currently
the charm does not expose a way to enable it. So, this change
looks at the traefik config on disk to check if it has the
correct number if units.
2023-10-03 17:04:06 +00:00
Guillaume Boutry b44facf667 Import explicity keystone setup module
In gate, 'zaza.openstack.charm_tests.keystone.setup.wait_for_all_endpoints' is
not found without the explicit import of the keystone setup module
2023-10-03 11:52:57 +02:00
Liam Young 2c16a82e5d Merge pull request #1142 from gboutry/fix/tempest-k8s-endpoints
Add waiting for endpoints between units scaling
2023-10-03 08:42:21 +01:00
Frode Nordahl bf452c39e4 tempest: Make concurrency configurable with a sane default.
Tempest will by default run with a concurrency matching the
number of cores on the test runner.

When running on a workstation, it is likely that the default
concurrency will be too high for the scale of deployed workload.

Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
2023-10-01 08:52:51 +02:00
Guillaume Boutry 850db0c5e3 Add waiting for endpoints between units scaling
Traefik might take some time to update its configuration,
and switch multiple times between active and maintenance for the duration.
Waiting only for tests is not enough. This change introduce a wait
for endpoints to be ready.

Moreover, at glance call to setup the image might fail because of this
very reason, add a retry on render_tempest_config_keystone_v3.
2023-09-28 16:51:37 +02:00
Hemanth Nakkina 9439c8b292 Add tempest tests for Octavia k8s
Add tempest tests for Octavia k8s with
scale-in/scale out.
Apply tempest config for octavia only
if it is not a k8s deployment.
2023-09-15 13:58:57 +05:30
Felipe Reyes 1d42b643f4 Add 'watcher' to tempest list of services 2023-08-24 19:38:11 -04:00
Felipe Reyes 98f89183e6 Bump up http timeout to 2 minutes.
Tempest clients have a default timeout of 60s which has shown to not be
enough for resource constrained environments.
2023-04-17 12:06:03 -04:00
Liam Young 4001604e08 Fix lint 2023-03-08 13:51:39 +00:00
Liam Young 053200096c Warning and NotImplementedError if application_name missing 2023-03-08 13:26:14 +00:00
Liam Young f806b2aa7a Add test to scale application out and in
Add test that scales an application out and in and checks each
stage with tempest.
2023-03-07 17:04:20 +00:00
Felipe Reyes 535275750e Add magnum section to tempest.conf template
The magnum section is used to declare configuration specific information
used by magnum-tempest-plugin

The keys used are:

- nic_id, to indicate the external network
- image_id, to indicate the fedora-coreos image to be used
- flavor_id, the flavor id to use when creating clusters
- dns_nameserver, the upstream dns server IP.
- network_driver, the network driver to test (flannel).
- labels, to pass a custom (local) image registry.
- insecure_registry, to mark the custom image registry as http (instead
  of https).
2023-02-14 14:45:20 -03:00
Felipe Reyes fa09a20b4b Add support for Magnum to use different images per release.
OpenStack Magnum relies on specific versions of Fedora CoreOS, this
patch addresses this maintaining a map of images per release according
to the upstream documentation[0]

The images are expected to be stored in the object store pointed out by
TEST_SWIFT_IP[1] environment variable in a container named 'magnum'. A
bash script to upload images can be found at
./zaza/openstack/charm_tests/magnum/upload_fedora_coreos_images.sh

[0] https://docs.openstack.org/magnum/latest/user/index.html#supported-versions
[1] https://github.com/openstack-charmers/zosci-config/pull/262
2023-02-14 14:45:11 -03:00
Bas de Bruijne feb667206b make provider-router name variable 2023-01-11 15:39:15 +00:00
Chris MacNaughton d0193e3817 Add new required dns.nameservers config 2022-11-21 14:31:24 +00:00
Liam Young 827d81fc12 Allow tempest to run in minimal mode (#956)
Add test class that runs tempest in miminal mode. This is useful
for testing that the OpenStack apis are responding but there are
components not configured like an external network. In addtion
some missing doc strings were added and support for neutron
tempest configuration pre ussuri removed as there is a branch
for that.
2022-10-20 11:18:04 +01:00
Felipe Reyes 8a9b519c81 Set tempest octavia provider to amphora.
By default the provider that will be used by tempest is "octavia" which
in Octavia's default configuration is an alias of amphora, although in a
Charmed OpenStack is not.

This change sets the provider to be used by octavia-tempest-plugin to
amphora.
2022-06-30 18:07:52 -04:00
Corey Bryant 41bc9e0069 Add manila support to tempest 2022-05-19 17:09:07 +00:00
Corey Bryant 860a9fd76c Favor the V3 volume endpoint for tempest config
If the V3 volume endpoint is available, use it for tempest testing.
The V2 volume endpoint is removed in OpenStack Xena, so this allows
us to use the latest available endpoint.
2021-10-14 14:51:31 +00:00
Aurelien Lourot b7e4bbf0fc Allow several tempest runs with different config
This deprecates:

    configure:
      - zaza.openstack.charm_tests.tempest.setup.render_tempest_config_keystone_v3
    tests:
      - zaza.openstack.charm_tests.tempest.tests.TempestTest

by allowing multiple runs with different config:

    tests:
      - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV2
      - zaza.openstack.charm_tests.openstack_upgrade.tests.OpenStackUpgradeTestsByOption
      - zaza.openstack.charm_tests.tempest.tests.TempestTestWithKeystoneV3
2021-09-16 10:00:06 +02:00
Corey Bryant 3229ce2d42 Switch tempest config to use include and exclude flags 2021-08-11 17:03:46 +00:00
Chris MacNaughton 779137f60f Restrict adding Octavia config
Only add Octavia's config when Octavia is in the enabled services
2021-05-06 14:12:33 +02:00
Chris MacNaughton e631b93541 Add proper support for Octavia's tempest tests (#498)
* Update tempest config for Octavia
* ensure the test_server is executable
* remove reference to accounts.yaml
2021-05-04 11:46:27 +02:00
Chris MacNaughton 7bf624b007 Update tempest config files to use newly renamed test_name_server variable 2020-09-25 12:53:13 +02:00
Chris MacNaughton 522d3e53b8 Only configure private Neutron CIDR if it is configured 2020-09-25 10:39:13 +02:00
Chris MacNaughton 70e758be05 Break out required environment variables
Instead of printing out the list of all required environment
variables when one is missing, only print out the missing
variables.
2020-09-24 15:18:49 +02:00
Chris MacNaughton e0795481d5 Add Octavia to Tempest service list 2020-09-11 11:42:25 +02:00
Chris MacNaughton 6a18a37c13 Ensure that the workspace deletion doesn't fail with file not found. 2020-08-20 17:21:36 +02:00
Chris MacNaughton 5455bee2e9 Fix protocol rendering for keystone URL
Closes #387
2020-08-20 08:52:00 +02:00
coreycb a67b4906ee Use juju model as workspace and store in home (#383)
* Use juju model as workspace and store in home

The current juju model will now be used as the tempest workspace name.
Additionally, all workspaces will be stored in ~/.tempest/<workspace>.

This patch also introduces a new option 'keep-workspace' that can be
specified along with other tempest options to keep the workspace after
tempest test execution. It defaults to False.

Also minor adjustment to smoke option to test boolean value.
2020-08-18 15:54:09 +02:00
Chris MacNaughton 37dfa53baf ensure that we add the bare cinder endpoint
When there is a cinderv2 or cinderv3 endpoint, we should
enable the bare cinder bits in the tempest config.
2020-07-03 16:04:14 +02:00
coreycb ac65792d53 Merge pull request #320 from gnuoy/tempest-auto-detect
Tempest auto detect
2020-06-12 12:07:50 -04:00
Liam Young 68648aede5 Tidyup following review feedback 2020-06-12 13:14:28 +00:00
Liam Young 12cf1725cb Fix service -> setup f map 2020-06-12 12:54:57 +00:00
Corey Bryant e8898979b5 Drop check for tempest workspace directory
This check is not necessary. The workspace is recreated on each
run, so just attempt to remove the workspace each time.
2020-06-12 01:56:17 +00:00
Liam Young b95c79c9e3 Include templates 2020-06-11 15:53:51 +00:00
Liam Young d837c0ed97 Automatically enable/disable config for tempest.
Automatically enable/disable config for tempest based on the
contents of the keystone service catalogue.
2020-06-11 14:12:16 +00:00
Corey Bryant bdc2e96e93 Drop OS_ prefix from SETUP_ENV_VARS 2020-06-09 14:22:26 +00:00
Corey Bryant 7f6ed4665d Fix pep8 error 2020-06-09 14:01:27 +00:00
Corey Bryant 4e993e4251 Move add_tempest_roles to keystone setup.py 2020-06-05 19:42:25 +00:00
Corey Bryant 3837b1ac85 Drop add_tempest_flavors in favor of using nova.setup.create_flavors 2020-06-05 15:54:33 +00:00