The octavia tests can sometimes fail when calling
get_lb_providers if they have not been setup yet.
This adds a retry if keystoneauth1.exceptions.http.NotFound
is raised.
Remove the work around for Bug #1964117 now that it is fixed
in the latest ovs package versions in ubuntu and the cloud
archive. This is fixed in the following versions of ovs:
xena (2.16.4), jammy/yoga (2.17.2), and kinetic (3.0.0).
Add a work around for Bug #1964117. To ensure that this is only
a temporary measure the fix is tied to specific OpenStack releases
and package versions.
This change drops the use of AssertionError in favor of
LoadBalancerUnexpectedState that was introduced by commit acaeb62 which
stopped retrying on AssertionError.
A missing 's' on importing the zaza.openstack.utilities.exceptions in
the octavia tests are causing gate tests to fail. This fixes the import
to point at the right module.
Fixes#721
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
* Stop retrying if LB provisioning status reached ERROR
The method `wait_for_lb_resource()` retries for 15m while the load
balancer could have reached to ERROR during the provisioning in the
first few minutes, this approach makes the testing take longer for no
reason.
This change makes the ERROR state in provisioning_status final and
abort raising a ValueError() exception.
More details of the provisioning_status possible states can be found at:
https://docs.openstack.org/api-ref/load-balancer/v2/#provisioning-status-codes
* Use LoadBalancerUnexpectedState and LoadBalancerUnrecoverableError.
Drop the (re-)use of AssertionError and ValueError to identify when a
load balancer status is in a state where the test needs to retry or
break and fail respectively.
This change introduces 2 new exceptions to be explicit of what the code
is trying to do.
- LoadBalancerUnexpectedState is raised when the status of the load
balancer is in a state different from the one requested by the caller,
but said state can be considered as transitory.
- LoadBalancerUnrecoverableError is raised when the status of the load
balancer is in ERROR state and said state is final for the
proviniong_status property, hence retrying only delays the failure.
Starting with OpenStack Wallaby the LBAASv2 API will require
authentication with system scoped token unless the user has
the 'load-balancer_admin' role.
Grant role on test setup, and remove it again on clean-up.
Fixes a typo (None -> not None) and renames the class from
ObjectRetrier -> ObjectRetrierWraps to make it clearer that the class
instantiation is to wrap and object with the retrier code rather than do
retries at that moment.
The main failure that seems to occur with clients is the
ConnectFailure, which according to the docs, is retry-able. Thus
provide a function that adds that exception condition automatically.
Also fix the import problem in octavia test for the object retrier that
is being used to validate the ObjectRetrier feature.
Temporarily disable this check until we figure out why
operational_status sometimes does not become 'ONLINE'
while the member does indeed work and the subsequent
retrieval of payload through loadbalancer is successful
ref LP: #1896729.
Creating a load balancer consist of many independent API calls.
If any one of them fail today the whole job will be killed.
On failure to create a lb resoruce, clean up and retry.
When running in a deployment that is focused on bundles rather
than a specific charm, the Octavia setup can fail because there
is no configured charm_name in the tests.yaml. This change
ensures that the Octavia setup can continue.
The current test code for octavia requires DVR extensions to be
present on the Neutron API server.
We need to conditionally enable this based on enabled extensions to
allow the test to operate on multiple deployment configurations.
The existing code lead to intermittent failures as there are a few
Neutron ports tagged with ``device:owner`` ``compute:nova`` that
has nothing to do with our payload instances.
Get IP information by asking Nova to list instances instead.
Setup can be used standalone by other charms consuming the
``octavia-diskimage-retrofit`` charm for their testing purposes.
Tests the charms actions.
Full end to end test will be done by consuming this charm in the
``octavia`` charm tests.