It is lookup up on the wrong endpoint... I check endpoints, no errors there - seems there is no filter to tell it what to look at.... 2023.2 is my version. I never saw this issue prior to 2023.x
Trigger = Call Magnum COE create, it creates a LB, looks up the subnet and chooses the wrong endpoint when the LB is being made in the neutron driver for octavia....
2024-01-29 17:15:55.984 733 ERROR wsme.api [None req-026ef7fd-67aa-412a-89e1-a7529c45e72c - e5b9296fbd9e4d9ea5e925780c64690f - - default default] Server-side error: "subnet not found (subnet id: 1b98d0d6-3eaa-490d-a9a4-e351fb0ebedf).". Detail:
Traceback (most recent call last):
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/network/drivers/neutron/base.py", line 189, in _get_resource
resource = getattr(
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/network/v2/_proxy.py", line 5111, in get_subnet
return self._get(_subnet.Subnet, subnet)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/proxy.py", line 61, in check
return method(self, expected, actual, *args, **kwargs)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/proxy.py", line 665, in _get
return res.fetch(
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/resource.py", line 1711, in fetch
self._translate_response(response, **kwargs)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/resource.py", line 1287, in _translate_response
exceptions.raise_from_response(response, error_message=error_message)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/openstack/exceptions.py", line 250, in raise_from_response
raise cls(
openstack.exceptions.ResourceNotFound: No Subnet found for 1b98d0d6-3eaa-490d-a9a4-e351fb0ebedf: Client Error for url: https://int.dave.openstack.tunninet.com:9696/v2.0/subnets/1b98d0d6-3eaa-490d-a9a4-e351fb0ebedf, Subnet 1b98d0d6-3eaa-490d-a9a4-e351fb0ebedf could not be found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/lib/kolla/venv/lib/python3.10/site-packages/wsmeext/pecan.py", line 82, in callfunction
result = f(self, *args, **kwargs)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/api/v2/controllers/load_balancer.py", line 453, in post
self._validate_vip_request_object(load_balancer, context=context)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/api/v2/controllers/load_balancer.py", line 308, in _validate_vip_request_object
self._validate_subnets_share_network_but_no_duplicates(load_balancer)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/api/v2/controllers/load_balancer.py", line 243, in _validate_subnets_share_network_but_no_duplicates
used_subnets[subnet_id] = network_driver.get_subnet(subnet_id)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/network/drivers/neutron/base.py", line 250, in get_subnet
return self._get_resource('subnet', subnet_id, context=context)
File "/var/lib/kolla/venv/lib/python3.10/site-packages/octavia/network/drivers/neutron/base.py", line 197, in _get_resource
raise getattr(base, '%sNotFound' % ''.join(
https:/ /docs.openstack .org/octavia/ latest/ _modules/ octavia/ network/ drivers/ neutron/ base.html# BaseNeutronDriv er.get_ subnet
def _get_resources_ by_filters( self, resource_type, unique_item=False,
* *filters) :
"""Retrieves item(s) from filters. By default, a list is returned.
If unique_item set to True, only the first resource is returned.
resources = getattr(
self. network_ proxy, f"{resource_ type}s" )(**filters)
conversion _function = getattr(
utils,
'convert_ %s_to_model' % resource_type)
res_list = [conversion_ function( next(resources) )] raise-missing- from
raise os_exceptions. NotFoundExcepti on(
f' No resource of type {resource_type} found that matches '
f' given filter criteria: {filters}.')
"""
try:
try:
# get first item to see if there is at least one resource
except StopIteration:
# pylint: disable=
if unique_item:
return res_list[0] function( r) for r in resources]
return res_list + [conversion_
except os_exceptions. NotFoundExcepti on as e:
'({resource_ type} Filters: {filters} .').format(
resource_ type=resource_ type, filters=filters)
[w.capitalize () for w in resource_ type.split( '_')]
)) (message) from e
'({resource_ type} Filters: {filters} .').format(
resource_ type=resource_ type, filters=filters)
LOG. exception( message) eption( message) from e
message = _('{resource_type} not found '
raise getattr(base, '%sNotFound' % ''.join(
except Exception as e:
message = _('Error retrieving {resource_type} '
raise base.NetworkExc
[docs] resource( 'network' , network_id, context=context)
def get_network(self, network_id, context=None):
return self._get_
[docs] resource( 'subnet' , subnet_id, context=context)
def get_subnet(self, subnet_id, context=None):
return self._get_
Somewhere, it is not using context to create the correct filter.... I am dead in the water on octavia usage without this, its also impacting magnum as i using octavia for this ;0 Thoughts ?