OVN AgentCache get_agents method filters agents incorrectly if hostname overlaps
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| neutron |
Fix Released
|
Medium
|
Rodolfo Alonso | ||
Bug Description
It was observed in a dcn environment where compute hostnames overlapped, like compute-0 and dcn1-compute-0, and the current code filters both of these host when any of these as passed as filter i.e host=dcn1-
Operation:- openstack port create --network dcn1-public --host dcn1-compute-0 port1
Fails as:-
2025-05-06 13:47:55.433 17 INFO neutron.
2025-05-06 13:47:55.433 17 ERROR neutron.
compute-0 - ovn-bridge-
dcn1-compute-0 - ovn-bridge-
Even the bridge mappings on dcn1-compute-0 is correct we can see the failure as it's not filtering correctly the hosts. This needs to be fixed.
Current code is:-
https:/
def get_agents(self, filters=None):
filters = filters or {}
agent_list = []
for agent in self:
if all(agent_dict[k] in v for k, v in filters.items()):
return agent_list
Originally reported at https:/
| Changed in neutron: | |
| importance: | Undecided → High |
| status: | New → Confirmed |
| Changed in neutron: | |
| importance: | High → Medium |
| Changed in neutron: | |
| assignee: | nobody → Rodolfo Alonso (rodolfo-alonso-hernandez) |

Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/949584
Review: https:/