There is a race in the 408 test for rabbitmq where the config-change to
enable ssl causes a leader-settings-changed hook in the non-leader units
which results in a rabbitmq service restart. This can happen at exactly
the same time as the test attempts to establish a connection with the
that unit. This patch retries the connection attempt.
Note that this may only be a partial fix as it's possible that a restart
will happen just after the connection is made, which would then result
in a test failure.
Related-Bug: LP#2002156
There are scenarios where the config-changed hook can complete, yet the
service IP get configured many seconds after, because a relation-changed
hook execution needs to be triggered on the hacluster side of the
relation.
This change adds a retry to the check (10 times with a 2 seconds wait
time).
This issue was found at the gate https://review.opendev.org/c/openstack/charm-designate-bind/+/861417
The create_segment() function is often failing in the gate
due to being unable to establish a connection to the masakari
endpoint. This will allow some more time for the endpoint to
become available when this error occurs.
PyYAML<5.1 fails with the error below on Python 3.10
AttributeError: module 'collections' has no attribute 'Hashable'
The fix got available by this commit
9959328b41
nosetest doesn't support python 3.10 and over the years the python
community has been settling on pytest as test runner, this change
introduces pytest and adds py3.10 to the gh workflow testing matrix.
In some testing environment, `wait_for_application_states()` can
execute before juju starts actually performing changes on the
units, causing it to return immediately.
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.
* Add method to check OpenStack endpoints
Add method to check OpenStack endpoints are returning acceptable
http codes. This should be used with caution as a charm whould
indicate if its payload is not ready via workload status and
workload status messages
* Fix dox string
When creating Openstack VMs the user has to specify the image it wants
to use. sstream-mirror-glance adds a date to the image name, so they
always have to recheck which is the current latest image.
This commit tests the usage of the `set_latest_property` configuration.
When --set-latest-property is given sstream-mirror-glance will set the
recently synced image with the `latest=true` property and then remove
the `latest` property from all the os_version/architecture matching
images.
Closes-bug: LP #1933130
* 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.
It was pinned in requirements.txt,
but this isn't picked up when installing this via pip.
So, it needs to be pinned in the setup.py install_require list too.