Commit Graph

1534 Commits

Author SHA1 Message Date
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
Guillaume Boutry
5b5021cef8 Remove scaling tests from glance
Current install does not offer a storage backend
for glance, therefore it cannot scale.
2023-09-28 14:25:03 +02:00
Felipe Reyes
13a728d262 Add logging 2023-09-27 23:33:05 -03:00
Felipe Reyes
0ca305f6c8 swift-proxy: wait for model to settle after running action
Let the units run all the hooks before attempting to check if the ring
is synced, because the action set-weight triggers the hook
swift-storage-relation-changed in the swift-storage units which it's the
one in charge of getting the new ring data.
2023-09-27 16:51:43 -03:00
Peter Sabaini
cfcee88c20 Retry ceph-dashboard ssl verification test
Avoid a race in configuring ssl on endpoints and services
2023-09-26 15:55:35 +02:00
Felipe Reyes
ea36acd3cc Merge pull request #37 from gnuoy/use-correct-mysql-pwd-key
Stop using legacy root-password key
2023-09-15 09:35:11 -03: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
Liam Young
39b09a3754 Merge pull request #1121 from gboutry/feat/designate
Add tempests tests for Designate K8S
2023-09-13 17:18:12 +01:00
Felipe Reyes
f9a4c92993 Use self.assertIsInstance()
Replace "assert type(...) is Foo" with "self.assertIsInstance(..., Foo)"
this produces a more meaningful test error message and fixes pep8 rule
E721[0]

[0] https://www.flake8rules.com/rules/E721.html
2023-09-11 08:35:11 -03:00
Guillaume Boutry
04f4694099 Add tempests tests for Designate K8S 2023-09-08 11:30:11 +02:00
Alex Kavanagh
054e2fe849 Merge pull request #1119 from freyes/content-too-short
Retry on ContentTooShort
2023-09-08 08:42:46 +01:00
Felipe Reyes
91c1cc3c33 Retry on ContentTooShortError
This patch makes the download_image() to retry automatically on
ContentTooShortError exception, this is an issue that has been seen on
the gate, see [0].

[0] https://openstack-ci-reports.ubuntu.com/artifacts/3ae/891712/3/check/focal-wallaby-pacemaker-remote-ssl_masakari/3ae840c/job-output.txt
2023-09-07 10:19:28 -03:00
Liam Young
bd8d7e8b29 Gate quorum queue tests on whether the charm supports them 2023-09-06 09:01:49 +00:00
Edward Hope-Morley
ddd99ba582 Skip glance cinderbackend tests for < xena 2023-09-05 14:45:57 +01:00
Alex Kavanagh
7925fd0447 Merge pull request #1101 from freyes/watcher
Add Watcher Test Case
2023-09-05 08:48:13 +01:00
Felipe Reyes
b087c0c2bd Retry check to avoid live migration unstability. 2023-09-04 15:49:31 -03:00
Felipe Reyes
7b4a2931a3 Merge pull request #1089 from lmlg/reef-master
Add the mapping for Ceph's Reef release (master)
2023-09-04 12:56:57 -03:00
Luciano Lo Giudice
cbf5cefb96 Fix mapping for Ceph Reef 2023-09-04 12:11:27 -03:00
Felipe Reyes
862e3b16af Merge pull request #1109 from openstack-charmers/bug/1107/change-manila-test-order
Change order of operations in test_manila_share()
2023-09-04 11:58:13 -03:00
Alex Kavanagh
3c00b93579 Change order of operations in test_manila_share()
The existing order of operations after restarting the share is:

 1. mount share on ins-1
 2. validate the test file on ins-1
 3. mount share on ins-2
 4. clear the test file using 'rm' on ins-1
 5. write the test file on ins-1
 6. read the test file on ins-2

The issue is that step 4. can result in a stale file handle on ins-2
which takes an unspecified amount of time to clear.  Mounting the share
on ins-2 after the file is re-written does however work without a stale
file handle.  The new order is:

 1. mount share on ins-1
 2. validate the test file on ins-1
 3. clear the test file using 'rm' on ins-1
 4. write the test file on ins-1
 5. mount share on ins-2
 6. read the test file on ins-2

Closes-Bug: #1107
2023-09-01 14:01:07 +01:00
Peter Sabaini
2968bf8e31 Retry ceph-proxy pool test
When running the pool setup we test after the model is idle, but that
is not a guarantee that all pools have finished setup, so that the test
could race the pool creation.

Add retry to the test to give the system another chance to complete
pool creation
2023-09-01 13:19:42 +02:00
James Page
0db3a02609 Merge pull request #1081 from gnuoy/add-rabbit-quorum-queue-tests
Add Quorum Queue rabbit tests
2023-08-29 11:42:06 +01:00
coreycb
a07fb4017a Add mantic and bobcat identifiers for OpenStack (#1102) 2023-08-25 18:05:15 +01:00
Felipe Reyes
449164284f Fix version and nova_api_version data types declared in docstring 2023-08-25 12:44:30 -04:00
Felipe Reyes
1d42b643f4 Add 'watcher' to tempest list of services 2023-08-24 19:38:11 -04:00
Felipe Reyes
6787c84267 Add watcher test.
This test launches 1 instance per hypervisor, and then launches a new
audit to optimize the use of hypervisors and consolidate the instances
in a single hypervisor, but also disabling the nova-compute service to
avoid new instances get allocated.
2023-08-24 19:38:11 -04:00
Felipe Reyes
55b3145865 Log available attributes on AttributeError
This simplifies when developing new tests and the programmer is not too
familiar with the different attributes an object has.
2023-08-24 19:38:11 -04:00
Felipe Reyes
11c3f80d5e resource_reaches_status: add new parameter stop_status
The stop_status parameter allows callers to ask stop retrying based on a
list of statuses that are known to be final (and error) states, this
saves time failing earlier.

Usage example for fail early when an instance reaches to ERROR status:

    openstack_utils.resource_reaches_status(self.nova_client.servers,
                                            instance_uuid,
                                            resource_attribute='state',
                                            expected_status='ACTIVE',
                                            stop_status='ERROR')
2023-08-24 19:38:11 -04:00
Felipe Reyes
be6ba2a02b launch_instance: expose nova api version and target host
This change exposes two new parameters in the launch_instance()
function:

- nova_api_version: Set the microversion the novaclient should use.
- host: Request to launch the instance on a specific hypervisor host.
2023-08-24 19:38:11 -04:00
Felipe Reyes
3283ed47ba Use None as get_nova_session_client() version default
This allows callers to pass None and let get_nova_session_client() to
use a sane default API, specifically this allows intermediate users
(e.g. launch_guest() ) to proxy values passed by the caller.
2023-08-24 19:38:11 -04:00
Felipe Reyes
fd824768b5 Add Watcher client support
Add get_watcher_session_client() helper function to build a
watcherclient.v1.Client instance authenticated with a keystone session
that uses admin credentials by default.
2023-08-24 19:37:56 -04:00
Guillaume Boutry
9e9401f10e Add tempests tests for Magnum k8s 2023-08-24 11:03:39 +02:00
Rodrigo Barbieri
e0498d6a16 Convert images to raw if ceph image backend (#1078)
Convert images to raw if ceph image backend

We are currently uploading qcow2 images, and
Nova is converting them to raw when running
the tests, sometimes timing out the tests.

With this change we are pre-converting the
images and uploading them as raw, so Nova
does not have to convert them.
2023-08-21 14:15:51 +01:00
Alex Kavanagh
3b17ad9d97 Merge pull request #1090 from UtkarshBhatthere/cephDashboardTest
Adds ssl config switch test to ceph-dashboard
2023-08-16 15:05:47 +01:00
Corey Bryant
5eab75b907 Prevent kerberos setup conflicts
This patch ensures kerberos setup does not create duplicate
domains, projects, or users. Duplicate domains were seen to
be caused when the tenacity decorator ran the function multiple
times.

Fixes #1094
2023-08-14 22:15:51 +00:00
Utkarsh Bhatt
c0b2a2cdb0 Adds SSL config switch test to ceph-dashboard
Signed-off-by: Utkarsh Bhatt <utkarsh.bhatt@canonical.com>
2023-08-14 16:41:02 +05:30
coreycb
931a00cbca Merge pull request #1093 from freyes/retry-mysql-exporter
Retry when checking mysql exporter endpoint
2023-08-08 20:17:37 -04:00
coreycb
dd1a891106 Merge pull request #1062 from freyes/fix-attribute-error
Refactor Hacluster.
2023-08-08 17:27:20 -04:00
Felipe Reyes
97d1b15d10 Retry when checking mysql exporter endpoint 2023-08-08 10:29:36 -04:00
Liam Young
543846d0c7 Merge pull request #1092 from hemanthnakkina/gnocchi-k8s-tempest-tests
Add tempest tests for Gnocchi k8s
2023-08-08 12:42:39 +01:00
hemanthnakkina
3c10dade2b Merge pull request #1091 from xtrusia/ceilometer_pep8_error
Fix pep8 error in ceilometer
2023-08-08 16:28:36 +05:30
Hemanth Nakkina
9eaafaa269 Add tempest tests for Gnocchi k8s
Add tempest tests for Gnocchi k8s
2023-08-08 16:23:41 +05:30
Alex Kavanagh
6896da206f Merge pull request #558 from freyes/bug/1922195
Add support for testing CephFS and ceph-proxy.
2023-08-08 09:53:48 +01:00
Seyeong Kim
f76b226ca4 Fix pep8 error in ceilometer
Fix below pep8 error message
zaza/openstack/charm_tests/ceilometer/tests.py:129:16: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinst
ance()`
2023-08-08 09:06:19 +09:00
Felipe Reyes
8991edd83b Merge pull request #1084 from openstack-charmers/vault-cache-test
Add vault cachine of secrets on relation test
2023-07-26 17:29:10 -04:00
Luciano Lo Giudice
27aca8a913 Add the mapping for Ceph's Reef release 2023-07-26 14:19:57 -03:00