[Bug 2141119] Re: [SRU] Don't fail if a provider driver cannot be loaded in Octavia API
Zachary Raines
2141119 at bugs.launchpad.net
Fri Feb 13 22:33:59 UTC 2026
** Description changed:
[ Impact ]
Currently, when the enabled_provider_drivers setting is not correctly
configured, e.g., it contains a non-existing driver, or when a provider
driver fails to load, octavia as a whole errors out and the API becomes
unreachable. This means that if there is a transient problem with a
provider, or a misconfiguration, even if that provider is not being
actively used, the other functioning drivers cannot be used.
[ Test Plan ]
- 1. Deploy openstack with octavia and the amphora and ovn-plugin providers.
- - For Yoga-Caracal, this can be done using Charmed
- OpenStack.
- - For Caracal-Epoxy this can be done with sunbeam.
+ 1. Deploy openstack with Sunbeam [0] and enable octavia `sunbeam enable
+ loadbalancer`.
- 2. Manually break the ovn-provider by adding an error to the __init__ method of
- the provider class.
+ 2. Enable the amphora provider by applying the following patch to
+ `/etc/octavia/octavia.conf` on the octavia unit
- 3. Confirm that octavia errors out on start.
+ ```
+ --- octavia.conf
+ +++ octavia.conf
+ @@ -3,9 +3,9 @@
+
+ [api_settings]
+ -enabled_provider_drivers = ovn:Octavia OVN driver
+ +enabled_provider_drivers = ovn:Octavia OVN driver, amphora:Amphora
+ default_provider_driver = ovn
+
+ [driver_agent]
+ -enabled_provider_agents = ovn
+ +enabled_provider_agents = ovn, amphora
+
+ [ovn]
+ ```
+
+ 3. Ensure that the octavia endpoint is working by calling `openstack loadbalancer provider list`
- 4. Refresh octavia with patched version.
+ Expected output:
+ ```
+ +---------+--------------------+
+ | name | description |
+ +---------+--------------------+
+ | ovn | Octavia OVN driver |
+ | amphora | Amphora |
+ +---------+--------------------+
+ ```
- 5. Repeat 2
+ 4. Manually break the ovn-provider by applying the following patch to `/usr/lib/python3/dist-packages/ovn_octavia_provider/driver.py` on the octavia unit
+
+ ```
+ --- driver.py
+ +++ driver.py
+ @@ -38,6 +38,7 @@
+ def __init__(self):
+ super().__init__()
+
+ + raise RuntimeError("internal error")
+ # NOTE (froyo): Move inside init method in order to
+ # avoid the issues on test scope colliding with Neutron
+ # already registered options when this register was
+ ```
+
+ 5. Restart the octavia api service with `pebble restart wsgi-octavia-api` and wait a little for the unit to settle.
- 6. Confirm that octavia comes up with the amphora provider.
+ 6. Call the api `openstack loadbalancer provider list` and observe an error
+ ```
+ Service Unavailable (HTTP 503) (Request-ID: None)
+ ```
+ and note that the API does not become available.
+
+ 7. Install the patched octavia-api package into the octavia unit
+
+ 8. Restart the octavia api service with `pebble restart wsgi-octavia-
+ api` and wait a little for the unit to settle.
+
+ 9. Call the API `openstack loadbalancer provider list` and note that the
+ API is available, and returns only the working provider (amphora)
+
+ Expected Output
+ =========
+ ```
+ +---------+--------------------+
+ | name | description |
+ +---------+--------------------+
+ | amphora | Amphora |
+ +---------+--------------------+
+ ```
+
+ [0]: https://canonical-openstack.readthedocs-hosted.com/en/latest/how-
+ to/install/install-canonical-openstack-using-the-manual-bare-metal-
+ provider/
+
[ Where problems could occur ]
This patch implements the strategy described in [0], skipping over
drivers which error while allowing others to proceed with
initialization. The Octavia API service now removes the failing
driver(s) from the enabled list, and the other provider drivers remain
functional.
Because driver initialization errors are no longer fatal, it is easier
for user to miss problems with their configuration. Errors are still
logged, however, and misconfigured drivers will be missing from the
provider list.
[ Other Info ]
This patch has been merged upstream into master, stable/*, and
unmaintained/*.
Story for this patch: https://storyboard.openstack.org/#!/story/2008710
Upstream patch: https://review.opendev.org/c/openstack/octavia/+/780215
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/2141119
Title:
[SRU] Don't fail if a provider driver cannot be loaded in Octavia API
Status in Ubuntu Cloud Archive:
New
Status in Ubuntu Cloud Archive antelope series:
New
Status in Ubuntu Cloud Archive bobcat series:
New
Status in Ubuntu Cloud Archive caracal series:
New
Status in Ubuntu Cloud Archive dalmatian series:
New
Status in Ubuntu Cloud Archive epoxy series:
New
Status in Ubuntu Cloud Archive flamingo series:
New
Status in Ubuntu Cloud Archive gazpacho series:
New
Status in Ubuntu Cloud Archive yoga series:
New
Status in Ubuntu Cloud Archive zed series:
New
Status in octavia package in Ubuntu:
Fix Released
Status in octavia source package in Jammy:
New
Status in octavia source package in Noble:
New
Status in octavia source package in Questing:
New
Status in octavia source package in Resolute:
Fix Released
Bug description:
[ Impact ]
Currently, when the enabled_provider_drivers setting is not correctly
configured, e.g., it contains a non-existing driver, or when a
provider driver fails to load, octavia as a whole errors out and the
API becomes unreachable. This means that if there is a transient
problem with a provider, or a misconfiguration, even if that provider
is not being actively used, the other functioning drivers cannot be
used.
[ Test Plan ]
1. Deploy openstack with Sunbeam [0] and enable octavia `sunbeam
enable loadbalancer`.
2. Enable the amphora provider by applying the following patch to
`/etc/octavia/octavia.conf` on the octavia unit
```
--- octavia.conf
+++ octavia.conf
@@ -3,9 +3,9 @@
[api_settings]
-enabled_provider_drivers = ovn:Octavia OVN driver
+enabled_provider_drivers = ovn:Octavia OVN driver, amphora:Amphora
default_provider_driver = ovn
[driver_agent]
-enabled_provider_agents = ovn
+enabled_provider_agents = ovn, amphora
[ovn]
```
3. Ensure that the octavia endpoint is working by calling `openstack loadbalancer provider list`
Expected output:
```
+---------+--------------------+
| name | description |
+---------+--------------------+
| ovn | Octavia OVN driver |
| amphora | Amphora |
+---------+--------------------+
```
4. Manually break the ovn-provider by applying the following patch to `/usr/lib/python3/dist-packages/ovn_octavia_provider/driver.py` on the octavia unit
```
--- driver.py
+++ driver.py
@@ -38,6 +38,7 @@
def __init__(self):
super().__init__()
+ raise RuntimeError("internal error")
# NOTE (froyo): Move inside init method in order to
# avoid the issues on test scope colliding with Neutron
# already registered options when this register was
```
5. Restart the octavia api service with `pebble restart wsgi-octavia-api` and wait a little for the unit to settle.
6. Call the api `openstack loadbalancer provider list` and observe an error
```
Service Unavailable (HTTP 503) (Request-ID: None)
```
and note that the API does not become available.
7. Install the patched octavia-api package into the octavia unit
8. Restart the octavia api service with `pebble restart wsgi-octavia-
api` and wait a little for the unit to settle.
9. Call the API `openstack loadbalancer provider list` and note that
the API is available, and returns only the working provider (amphora)
Expected Output
=========
```
+---------+--------------------+
| name | description |
+---------+--------------------+
| amphora | Amphora |
+---------+--------------------+
```
[0]: https://canonical-openstack.readthedocs-hosted.com/en/latest/how-
to/install/install-canonical-openstack-using-the-manual-bare-metal-
provider/
[ Where problems could occur ]
This patch implements the strategy described in [0], skipping over
drivers which error while allowing others to proceed with
initialization. The Octavia API service now removes the failing
driver(s) from the enabled list, and the other provider drivers remain
functional.
Because driver initialization errors are no longer fatal, it is easier
for user to miss problems with their configuration. Errors are still
logged, however, and misconfigured drivers will be missing from the
provider list.
[ Other Info ]
This patch has been merged upstream into master, stable/*, and
unmaintained/*.
Story for this patch: https://storyboard.openstack.org/#!/story/2008710
Upstream patch: https://review.opendev.org/c/openstack/octavia/+/780215
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/2141119/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list