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.
Due to the race condition described in LP: #2024481, before adding
networks to the speaker we need to wait until it gets scheduled,
otherwise it may not advertise some routes that are attempted to be
advertised before the speaker is scheduled to a dragent service causing
a non-fatal service error.
The configure step for the DRAgent tests configures a name for a
floating IP to be checked for at the peer side. Since the data plane
tests add one as well for an instance, make sure the control plane-only
tests rely on the FIP that has a specific name. This can be useful if
the tests are run in a different order.
For the NDR data plane testing case those checks cannot be performed
from the node that runs Zaza and instead need to be performed from a
unit that receives dynamic routes from the BGP speaker.
In order to allow for that case an additional argument is introduced.
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.
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.
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.
* 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.
Follow-up of #860 and #791 to fix:
File "./zaza/openstack/charm_tests/test_utils.py", line 798, in launch_guest
return configure_guest.launch_instance(
File "./zaza/openstack/configure/guest.py", line 128, in launch_instance
image_name = image_name or boot_tests[instance_key]['image_name']
KeyError: 'jammy'
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
I recently added an option to have zaza delete and relaunch a
guest if it failed to be provisioned or failed a connectivity
test. However, in the code to remove the an instance I
accidentaly called the method that checks that a resource has
gone and not the method that actually does the removal. This
patch fixes that. NOTE: Only the Trilio tests use this
retryer function atm
Add a method called launch_instance_retryer which will attempt
to launch an instance. In the event that it fails the instance
will be removed and another attempt to launch an instance will
be attempted.
The neutron ``basic_overcloud_network`` setup job performs both
undercloud and charm configuration prior to configuring the
overcloud network. The undercloud and charm configuration steps
are useful outside the context of OpenStack Neutron.
Split undercloud and charm setup into a new configure step.
Allow launching an instance and attaching it directly to the
external provider network. This is useful in its own right and
is also a requirement in order to successfully test some
configurations.
This adds a new setup function that will setup a VLAN provider network.
It can be called by tests.yaml after basic_overcloud_network:
- zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network
- zaza.openstack.charm_tests.neutron.setup.vlan_provider_overcloud_network
A recent change introduced a configuration option in the
./tests/test.yaml file (default location) which allows juju wait to be
used rather than waiting on various workload messages. This,
unfortunately, breaks mojo tests as they don't use a tests.yaml. This
change refactors that code, and enables a 'use_juju_wait' to be passed
into the relevant functions, and a new command line option (default
true) to disable using juju wait.
It's a bit too optimistic to expect an instance to respond to the first
ping. This patch gives the instance up to 8 retries with increasingly
lengthened waits to respond to a ping. This should help with Juju
storage backed nova instances.
Fixes: #265
* Add method for deleteing pacemaker nodes.
* Due to LP #1874719 use above to delete node1
* During test cleanup the tests re-enable hosts from a masakari pov,
if that host still has outstanding notifications it will fail so
retry the enable.
* pacemakerd process name has changed on focal so account for that
when killing it.
Previous attempts to fix LP Bug#1784083 added a workaround (commit
820ed808) which is being removed here.
The root cause seems to be upstream in the dragent. It may never have
been envisioned to run the agent by itself the way the charm does.
So that even if neutron-api completes its amqp relation first,
neutron-dynamic-routing can still see
oslo_messaging.exceptions.MessagingTimeout errors. Some operation
must occur against neutron before dragent is truly ready. i.e. some post
deploy openstack command. So it is outside the purview of the charm.
This change adds a service restart late.
Partial-Bug: #1841459
This is useful for validating deployments with OVN where it is not
required to have external networking attached to every chassis.
Any chassis that does not have external networking directly
attached will forward traffic destined for the external network
through a tunnel to a chassis that does.
It turns out we do need to set DNS on the overcloud subnet. It should be
the .2 of the CIDR under test and not the _admin_net's .2. There seems
there are security group rules in the way.