Commit Graph

46 Commits

Author SHA1 Message Date
Edward Hope-Morley b1690d40ae Skip noble image sync for octavia tests
Noble was recently added but is not needed and is tipping
glance/ceph storage usage over the limit in release tests.
2024-09-27 17:27:41 +01:00
Nicholas Njihia 3c4482b732 Add Octavia volume-based Amphora test
Enable Amphora to run instances booted from
volume by flipping the config option
`enable-volume-based-amphora` to True and
checking volumes attached to the amphora
instances.

Depends-On: https://review.opendev.org/c/openstack/charm-octavia/+/810567
Related-Bug: https://launchpad.net/bugs/1901732
2024-09-22 21:38:58 +01: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
Edward Hope-Morley 5b1991bbc2 Retry octavia get_lb_providers
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.
2023-05-30 15:16:16 +01: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
Corey Bryant 8919e508c0 Add jammy image to octavia ensure_lts_images() 2022-09-30 17:08:48 +00:00
coreycb 383726b15e Remove workaround for Octavia Bug #1964117 (#922)
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).
2022-09-19 15:58:05 +01:00
Liam Young 4fcf8d2c7a Do not apply work-around to OVN deploys 2022-03-16 06:29:55 +00:00
Liam Young 20e3e1412d Add workaround for Octavia Bug #1964117
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.
2022-03-15 15:40:48 +00:00
Felipe Reyes 6ae8ae47fe Fix Octavia wait_for_lb_resource()
This change drops the use of AssertionError in favor of
LoadBalancerUnexpectedState that was introduced by commit acaeb62 which
stopped retrying on AssertionError.
2022-03-15 12:23:14 -03:00
Billy Olsen cd5c8c26eb Import exceptions module instead of exception (#722)
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>
2022-03-14 20:36:33 +00:00
Felipe Reyes acaeb62a4d Stop retrying if LB provisioning status reached ERROR (#682)
* 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.
2022-03-08 13:11:51 +00:00
Zhang Hua 4cbee5bfd2 Delete hm port on unit removal - part 4 - disabled test 2021-11-23 09:37:31 +08:00
Zhang Hua 825cc8b266 Delete hm port on unit removal - part 3
This is Zaza functional test for lp:1915512. Add a unit and then remove a unit,
then query the list of ports to check that the port has been deleted.

Depends-On: https://review.opendev.org/c/openstack/charm-octavia/+/787700
2021-10-12 19:11:38 +08:00
Zhang Hua b44aa8823c Delete hm port on unit removal
This is Zaza functional test for lp:1915512. Add a unit and then remove a unit,
then query the list of ports to check that the port has been deleted.

Depends-On: https://review.opendev.org/c/openstack/charm-octavia/+/787700
2021-07-19 11:45:43 +08:00
Frode Nordahl 13eb800682 octavia: Add version fence for adding the LBAAS role 2021-07-05 11:43:59 +02:00
Frode Nordahl 858487e207 octavia: Grant role to ensure access to LBAASv2 API
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.
2021-06-18 13:07:47 +02:00
Frode Nordahl d51a28dc04 Re-order change of expected workload status
After recent changes to zaza workload status code the present
ordering does no longer work.
2021-05-18 11:55:55 +02:00
Frode Nordahl 7dd96c8fb1 Revert "Skip OVN provider octavia test on Victoria"
This reverts commit c4691ef1c7.
2021-05-11 10:51:18 +02:00
Alex Kavanagh e9f11da5df Fix typo and rename class for better understanding
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.
2021-03-25 14:47:42 +00:00
Alex Kavanagh c041042fe2 Add function to just retry on keystone ConnectFailure
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.
2021-03-10 09:41:10 +00:00
Alex Kavanagh ed8528b76a Add object retrier to the LB tests for octavia 2021-03-10 09:40:03 +00:00
Frode Nordahl 4cbf70dd5e octavia: Configure SSH key to allow debugging of Amphorae (#495) 2021-02-04 08:56:22 +01:00
Liam Young c4691ef1c7 Skip OVN provider octavia test on Victoria
The OVN provider octavia test on Victoria is currently broken due
to Bug #1896603. Until it is fixed skip the test.
2021-01-29 13:51:25 +00:00
Frode Nordahl 440ee4b274 octavia: Disable check for member operational status
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.
2020-10-19 09:50:53 +02:00
Frode Nordahl be59370476 Forcefully remove amphorae when Octavia is unable to remove 2020-09-22 14:50:09 +02:00
Frode Nordahl 430704ef80 Retry retrofit action
The retrofit process involves downloading packages from
the internet and is as such susceptible to random failures due to
internet gremlins.
2020-09-21 08:18:05 +02:00
Frode Nordahl e9215f1d73 Retry load balancer resource creation
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.
2020-09-21 08:18:00 +02:00
Chris MacNaughton dd2802057f Ensure that octavia sets up application_name
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.
2020-08-28 13:55:42 +02:00
Frode Nordahl 849e08528b octavia: fix pause/resume test and temporarily disable it
Re-enable when LP: #1886202 is fixed.
2020-07-03 16:33:50 +02:00
Frode Nordahl b4f155d5e3 octavia: Consume common helpers for test instance lifecycle 2020-07-03 08:56:04 +02:00
Alex Kavanagh c04e632ae0 The octavia tests require multiple LTS images
This patch ensures that bionic and focal images are available for
the LTS octavia tests.
2020-05-06 14:59:32 +01:00
Frode Nordahl 91c120a650 octavia: only run tearDown on success 2020-04-08 07:35:14 +02:00
Frode Nordahl 116da9ca6c octavia: tear down resources created during LBaasV2 test
Fixes #221
2020-04-07 17:56:37 +02:00
Frode Nordahl 998a61a6a5 octavia: Support testing multiple providers 2020-02-03 10:41:40 +01:00
Frode Nordahl c2e585ae4c octavia: Move LB creation API calls to helper 2020-02-03 10:35:49 +01:00
Frode Nordahl 3b6a2de1ca octavia: Conditionally use DVR specific flags
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.
2020-01-17 16:07:00 +01:00
Frode Nordahl bf23d80a1b octavia: Add setup and test code for DVR 2019-07-19 13:19:23 +02:00
Frode Nordahl cbcbb90922 octavia: Fix gathering of payload ips
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.
2019-07-16 11:57:34 +02:00
Frode Nordahl 7140e4e064 Add payload test
Create listener, pool, healthmonitor and members.

Check that we can get payload through the load balancer.
2019-06-21 14:41:40 +02:00
Frode Nordahl e395d1baf2 Add setup function for payload test instance
The instance will listen on TCP port 80 and serve up a Apache
welcome page.  This can be put behind a load balancer to validate
operation.
2019-06-21 14:41:27 +02:00
Frode Nordahl a73cede82a Fix erroneous use of generator return 2019-06-20 12:35:06 +02:00
Frode Nordahl cb68bdb490 Add missing docstring, use new raise_on_failure param
The Zaza run_action functions ought to have a raise exception
option, openstack-charmers/zaza#251
2019-06-20 07:59:17 +02:00
Frode Nordahl 9104c82b91 octavia/diskimage-retrofit: Add charm setup and tests
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.
2019-06-19 15:28:32 +02:00
Chris MacNaughton dd434e281e Add zaza namespacing, starting with openstack 2019-04-25 17:46:03 +02:00