2024-03-07 18:50:38 |
Dmitriy Rabotyagov |
description |
In a scenario, where enable_distributed_floating_ip is set to False (default behaviour), ovn-bgp-agent does not attempt to announce the FIP from the gateway node when it is expected to.
This happens due to acquiring `requested-chassis` field during filtering of watcher. So LogicalSwitchPortFIPCreateEvent class asks for chassis id:
https://opendev.org/openstack/ovn-bgp-agent/src/commit/c00139d5598324b037944f3560323d9de010a2ec/ovn_bgp_agent/drivers/openstack/watchers/nb_bgp_watcher.py#L176
Which returns the UUID of the compute node, rather then gateway chassis:
https://opendev.org/openstack/ovn-bgp-agent/src/commit/c00139d5598324b037944f3560323d9de010a2ec/ovn_bgp_agent/drivers/openstack/watchers/base_watcher.py#L114
From other side, to be fair, `ovn-nbctl list Logical_Switch_Port b9c80bef-7962-4db3-8b31-c0c53c75f9c5` does not contain any information that would map such FIP to a gateway - it's only mapped to the compute/VM:
# ovn-nbctl list Logical_Switch_Port
_uuid : b9c80bef-7962-4db3-8b31-c0c53c75f9c5
addresses : ["fa:16:3e:bc:d3:f0 172.16.0.227"]
dhcpv4_options : 1c71a1ff-3d3a-4e5c-91e1-9caa9d5c0c2a
dhcpv6_options : []
dynamic_addresses : []
enabled : true
external_ids : {"neutron:cidrs"="172.16.0.227/24", "neutron:device_id"="4d8eb566-76c0-4c50-8355-ae847cccf0bb", "neutron:device_owner"="compute:az1", "neutron:host_id"=os-compute02-az1, "neutron:network_name"=neutron-50854f6d-184e-4f19-a5cf-fbc2d51720f4, "neutron:port_capabilities"="", "neutron:port_fip"="ip.add.re.ss", "neutron:port_name"="", "neutron:project_id"="9def30ac22ec46fb82a6bb531d50023b", "neutron:revision_number"="4", "neutron:security_group_ids"="93f165b2-3969-4833-8771-ac1185c3dcfe", "neutron:subnet_pool_addr_scope4"="", "neutron:subnet_pool_addr_scope6"="", "neutron:vnic_type"=normal}
ha_chassis_group : []
mirror_rules : []
name : "0bc9af90-8e0b-4941-9720-794f5d41e440"
options : {requested-chassis=os-compute02-az1}
parent_name : []
port_security : ["fa:16:3e:bc:d3:f0 172.16.0.227"]
tag : []
tag_request : []
type : ""
up : true |
In a scenario, where enable_distributed_floating_ip is set to False (default behaviour), ovn-bgp-agent does not attempt to announce the FIP from the gateway node when it is expected to.
This happens due to acquiring `requested-chassis` field during filtering of watcher. So LogicalSwitchPortFIPCreateEvent class asks for chassis id:
https://opendev.org/openstack/ovn-bgp-agent/src/commit/c00139d5598324b037944f3560323d9de010a2ec/ovn_bgp_agent/drivers/openstack/watchers/nb_bgp_watcher.py#L176
Which returns the UUID of the compute node, rather then gateway chassis:
https://opendev.org/openstack/ovn-bgp-agent/src/commit/c00139d5598324b037944f3560323d9de010a2ec/ovn_bgp_agent/drivers/openstack/watchers/base_watcher.py#L114
From other side, to be fair, `ovn-nbctl list Logical_Switch_Port b9c80bef-7962-4db3-8b31-c0c53c75f9c5` does not contain any information that would map such FIP to a gateway - it's only mapped to the compute/VM:
# ovn-nbctl list Logical_Switch_Port b9c80bef-7962-4db3-8b31-c0c53c75f9c5
_uuid : b9c80bef-7962-4db3-8b31-c0c53c75f9c5
addresses : ["fa:16:3e:bc:d3:f0 172.16.0.227"]
dhcpv4_options : 1c71a1ff-3d3a-4e5c-91e1-9caa9d5c0c2a
dhcpv6_options : []
dynamic_addresses : []
enabled : true
external_ids : {"neutron:cidrs"="172.16.0.227/24", "neutron:device_id"="4d8eb566-76c0-4c50-8355-ae847cccf0bb", "neutron:device_owner"="compute:az1", "neutron:host_id"=os-compute02-az1, "neutron:network_name"=neutron-50854f6d-184e-4f19-a5cf-fbc2d51720f4, "neutron:port_capabilities"="", "neutron:port_fip"="ip.add.re.ss", "neutron:port_name"="", "neutron:project_id"="9def30ac22ec46fb82a6bb531d50023b", "neutron:revision_number"="4", "neutron:security_group_ids"="93f165b2-3969-4833-8771-ac1185c3dcfe", "neutron:subnet_pool_addr_scope4"="", "neutron:subnet_pool_addr_scope6"="", "neutron:vnic_type"=normal}
ha_chassis_group : []
mirror_rules : []
name : "0bc9af90-8e0b-4941-9720-794f5d41e440"
options : {requested-chassis=os-compute02-az1}
parent_name : []
port_security : ["fa:16:3e:bc:d3:f0 172.16.0.227"]
tag : []
tag_request : []
type : ""
up : true |
|