Commit Graph

339 Commits

Author SHA1 Message Date
James Page
e81dd1b957 Add metadata for Dalmatian and Epoxy releases. 2024-11-22 10:02:51 +00:00
Frode Nordahl
a5ad00acf1 undercloud_and_charm_setup: Add support for LXD.
This adds basic LXD support that allows adding second NIC to
instances hosting networking charms as well as populating said
charms configuration with the second NIC MAC address.

Signed-off-by: Frode Nordahl <fnordahl@ubuntu.com>
2024-10-14 09:00:01 +02:00
Alex Kavanagh
32bcda1cc2 Add octavia to UPGRADE_SERVICES 2024-09-19 11:10:35 +01:00
Alex Kavanagh
12c69fdca3 Reduce ObjectRetrierWraps logging noise during normal use 2024-07-02 10:50:54 +01:00
Alex Kavanagh
1f0808e238 Fix ObjectRetrierWraps recursive wrapping
In order to ensure that an object that contains other objects that are
called (e.g. the VolumeManager object on the Cinder client object), the
ObjectRetrierWraps class needs to more agressively wrap non builtin
classes.
2024-07-02 10:50:54 +01:00
Alex Kavanagh
704059a996 Add additional debug for ObjectRetrier
It wasn't capturing member variables on the wrapped object that would
then be used to make the call; thus, wrap those.

This also disables (temporarily) the long running cinder backup test
deletion whilst checking whether retries are the problem.
2024-07-02 10:50:54 +01:00
Peter Sabaini
418c98ee57 Add squid package name 2024-05-13 21:46:18 +02:00
Felipe Reyes
ae9a99feaa Add caracal to codename maps
jammy-caracal, noble-caracal, 2024.1 and noble are being added to their
respective codename maps to allow the testing to recognize caracal
2024-05-08 17:51:00 -04:00
Billy Olsen
a64d2c6b03 Use zaza.model.run_on_unit for ca checks
Existing code uses the python libjuju unit.run in order to execute
a wait check for ca readiness across the units. The behavior of libjuju
changed between 2.x and 3.x and causes this functionality to break. This
is abstracted and handled in the zaza library, so use that code instead
as it properly handles the differences.

Signed-off-by: Billy Olsen <billy.olsen@canonical.com>
2024-03-18 12:27:04 -07:00
Liam Young
7fe5b88a69 Move wait_for_url and rename wait_for_client 2023-12-04 13:18:08 +00:00
Alex Kavanagh
def0148642 Add a retrier-wrap to the nova client for octavia tests
The nova service may not be quite ready after vault initialisation for
the basic network configuration, so add a retrier wrapper around the
client for every test to make sure that it retries.
2023-10-31 19:44:49 +00:00
Corey Bryant
0684a62383 Updates for charm/openstack upgrade testing
Updates charm upgrades to use channels, tracks, and risks instead
of URLs.

Currently these tests only upgrade OpenStack charms and packages.
The OVN, ceph, and misc charms and payloads are not upgraded.

Remove instance creation since tempest can be used to verify the
cloud.
2023-10-25 19:28:23 +00:00
Felipe Reyes
13a728d262 Add logging 2023-09-27 23:33:05 -03: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
Alex Kavanagh
7925fd0447 Merge pull request #1101 from freyes/watcher
Add Watcher Test Case
2023-09-05 08:48:13 +01: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
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
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
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
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
Luciano Lo Giudice
27aca8a913 Add the mapping for Ceph's Reef release 2023-07-26 14:19:57 -03:00
Dmitrii Shcherbakov
110242796c Allow an optional FIP service subnet to be set up
A separate service subnet for FIPs is useful in making sure that
connectivity based on the advertised routes really works as opposed to
relying on directly connected routes to FIPs in the undercloud network
subnet used as an external network.
2023-06-12 21:35:57 +04:00
Felipe Reyes
b453a85013 Improve logging of _resource_removed()
On failures there is no information of the state of the objects that
couldn't be removed, maybe there are on their way to be removed and this
is a failure visible on slow clouds and not an actual issue, this will
help with troubleshooting.
2023-05-26 15:41:27 -04:00
Dmitrii Shcherbakov
842637477c Switch from Quagga to FRR
A charm that uses FRR instead of Quagga is now published under:
https://charmhub.io/osci-frr

For our purposes FRR is a drop-in replacement of Quagga but the point
of a change is to remove Quagga references for clarity.
2023-05-23 21:31:44 +03:00
Felipe Reyes
8adbceaf26 Retry when listing glance images.
Issue seen at the gate:

    glanceclient.exc.CommunicationError: [...] ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2023-05-05 11:41:22 +02:00
Felipe Reyes
60cbdb9e96 Use CompareOpenStack to determine the keystone api version to use. 2023-03-28 15:08:39 -03:00
Felipe Reyes
7205e31753 Add CompareOpenStack class.
The CompareOpenStack class allows the comparison of OpenStack codenames.
2023-03-28 15:01:56 -03:00
Corey Bryant
d054d3e695 Add lunar and antelope identifiers for OpenStack 2023-02-02 16:07:08 -05:00
Bas de Bruijne
9fb488efef Update series upgrade automation (#952)
* update series upgrade test

* bug fixes

* bug fixes
2023-01-23 12:39:10 +00:00
Bas de Bruijne
feb667206b make provider-router name variable 2023-01-11 15:39:15 +00:00
Bas de Bruijne
d3c9be2f84 make network and image names variable 2023-01-11 15:34:02 +00:00
coreycb
41fbc20583 Add kinetic support (#977) 2023-01-11 15:18:01 +00:00
James Page
bab65e8c2e k8s: use action to retrieve admin password
The Keystone K8S operator now uses generated passwords; make use
of the helper action to retrieve the admin password.
2022-10-11 11:43:01 +01:00
Felipe Reyes
a55f320c2a Add test for keystone-openidc (#925)
* Add keystone-openidc setup code.

The keystone-openidc charm requires 2 configuration steps:

1) Configure the oidc-client-id, oidc-client-secret and
   oidc-provider-metadata-url, this information is tightly related to
   the Identity Provider configured, which for testing purposes this is
   the openidc-test-fixture charm, the setup function
   zaza.openstack.charm_tests.openidc.setup.configure_keystone_openidc
   takes care of setting these values once the fixture charm is ready
   for service.
2) Create the OpenStack objects to correctly configure the federation,
   this is made by the setup function
   zaza.openstack.charm_tests.openidc.setup.keystone_federation_setup_site1
   which will create and configure the following resources:
   - Create a domain named 'federated_domain'.
   - Create a group named 'federated_users'.
   - Grant the 'Member' role to users in the 'federated_users' group.
   - Create an identity provider named 'openid'.
   - Create a mapping named 'openid_mapping'.
   - Create a federation protocol named 'openid' that relates the mapping
     and the identity provider.

* Add support for v3oidcpassword auth plugin.

get_keystone_session() uses the v3.OidcPassword class when the
OS_AUTH_TYPE is set to v3oidcpassword, this class expects the following
extra configuration options:

- OS_IDENTITY_PROVIDER
- OS_PROTOCOL
- OS_CLIENT_ID
- OS_CLIENT_SECRET
- OS_ACCESS_TOKEN_ENDPOINT (optional)
- OS_DISCOVERY_ENDPOINT (optional)

* Add test for keystone-openidc

This patch introduces a new testing class named CharmKeystoneOpenIDCTest
which interacts with keystone using users provided by
openidc-test-fixture via OpenID Connect.

* Add keystone_session argument to launch instances.

Adding the option to pass a keystone session allows callers to use
credentials different from the ones provided by
get_overcloud_keystone_session(), this is helpful when testing non
default keystone configurations (e.g. Federation).

* Add zaza.openstack.charm_tests.openidc.tests.TestLaunchInstance

This testing class configures a private network in the user's project defined by the mapping
rules during the setUpClass stage. Specifically this test performs the following steps:

- Create keypair named 'zaza' in the user's project
- Create a router for the project
- Attach the router to the external network
- Create a network
- Create a subnet attached to the previously create network
- Connect the subnet to the project's router

The testing method launches an instance using a keystone session
associated with a user backed by OpenID Connect.
2022-10-05 13:34:18 +01:00
Liam Young
99186a6651 Add k8s compatible method for keystone auth (#945)
* Add k8s compatible method for keystone auth

* Mock out is_k8s_deployment
2022-10-03 18:27:56 +01:00
Liam Young
65cc55a5db Remove liberty special case (#944)
* Remove liberty special case

* Update unit test
2022-10-03 12:52:30 +01:00
Dmitrii Shcherbakov
87d347d02a Add a codename and release pair for Zed 2022-09-07 00:57:26 +03:00
Liam Young
17234c9e15 Respect model in get_swift_storage_topology
Change 0af4c93d causes the target model to be ignored when a
model_name was specified. This in turn is causing the swift
cmr tests to fail as an ip of None is being recorded for
units in a different model.
2022-09-02 14:17:07 +00:00
Liam Young
b4b645ab9a Add fallback ubuntu image location 2022-09-02 14:09:57 +00:00
Samuel Walladge
bb3d93b00a Add test for online extending lvm volume in cinder (#854) 2022-09-01 09:23:57 +01:00
Samuel Walladge
c396608daa Fix pep8 lint errors
One of the pep8 target dependencies must have updated,
causing a bunch of new lint errors in these categories:
- line length > 79 chars
- no whitespace after keyword
2022-08-03 13:44:22 +09:30
Alex Kavanagh
9dc87efdb5 Revert "Add test for online extending lvm volume in cinder (#776)"
This reverts commit e21909717e.
2022-07-28 10:20:12 +01:00
Oprin Marius
243435883f Add Magnum tests (#515)
- Add Heat domain-setup action as a setup configuration option which can be used in other charms
  - test_100_domain_setup is being deprecated if the new configuration option is being used
- Add Magnum tests
  - test create magnum cluster template
  - test create magnum cluster
  - test config changes
  - test pause and resume
- TEST_MAGNUM_QCOW2_IMAGE_URL environment variable is required in the CI
  - The value of this variable should be a link to a fedora-coreos QCOW2 image
2022-07-05 12:06:02 +01:00
Samuel Walladge
e21909717e Add test for online extending lvm volume in cinder (#776)
* Add test for online extending lvm volume in cinder

* Fix pep8 issues

Co-authored-by: Samuel Walladge <samuel.walladge@canonical.com>
2022-07-01 15:37:55 +01:00
Luciano Lo Giudice
be70ef7529 Make Ceph tests idempotent (#795)
With the upcoming transition to an operator-framework charm, the
Ceph tests need to be idempotent, since we'll be testing the upgrade
path from classical to operator. The tests that need fixing are the
ones that call out to add/remove disks, since they create loopback
devices to back the OSD's but never remove them.
2022-06-27 20:44:24 +02:00