Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-7462

Router GW IP exposed by resync instead of when it is created

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • ovn-bgp-agent
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • Important

      The following tempest test fails due to this issue:
      neutron_tempest_plugin.scenario.test_floatingip.DefaultSnatToExternal.test_snat_external_ip

       

      A VM is created with a port connected to a tenant network. That network is connected to the external network through a router. The router external GW port should be exposed by the ovn-bgp-agent from the chassis where it is scheduled by OVN, despite setting expose_tenant_networks to False.

       

      The LRP is created and attached to a chassis at 10:29:43:

      record 24929:
       term: 2
       index: 29280
       eid: 4d22
       2024-06-04 10:29:42.905
      ...
        table Logical_Router_Port insert row "lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0" (f989662a):
          networks=["192.168.133.231/24"]
          mac="fa:16:3e:aa:5c:ab"
          external_ids={"neutron:is_ext_gw"=True, "neutron:network_name"=neutron-51d2b9f0-7d41-417c-a3c0-03a3a3addab9, "neutron:revision_number"="1", "neutron:router_name"="74e21745-b4c0-4451-bb3a-3fe1349027d0", "neutron:subnet_ids"="2dc3e9dc-322f-4575-a837-3c07354cdd1f"}
          name=lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0
          gateway_chassis=[2d66921d-c1b5-4519-850b-3653ab9b7fe8, 33503aa9-c4d6-4178-a268-8976747d6647, c344a149-2fc3-4c26-ac10-29b2baae34ee]
        table Gateway_Chassis insert row "lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_6b27cfda-0512-4bd9-994b-91029104a06d" (c344a149):
          name=lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_6b27cfda-0512-4bd9-994b-91029104a06d
          priority=2
          chassis_name="6b27cfda-0512-4bd9-994b-91029104a06d"
        table Gateway_Chassis insert row "lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_f8732844-104a-47b9-906b-920378b6a6e9" (2d66921d):
          name=lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_f8732844-104a-47b9-906b-920378b6a6e9
          priority=3
          chassis_name="f8732844-104a-47b9-906b-920378b6a6e9"
        table Gateway_Chassis insert row "lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_e7539a46-07e0-480c-a556-75c4385e99c3" (33503aa9):
          name=lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0_e7539a46-07e0-480c-a556-75c4385e99c3
          priority=1
          chassis_name="e7539a46-07e0-480c-a556-75c4385e99c3"
      ...
      record 24933:
       term: 2
       index: 29282
       eid: c1f8
       2024-06-04 10:29:43.759 "ovn-northd"
        table Logical_Router_Port row "lrp-ff6c65ec-5cfc-4845-af19-3db164c9d3b0" (f989662a) diff:
          status={hosting-chassis="f8732844-104a-47b9-906b-920378b6a6e9"}

       

      That chassis corresponds with the networker-1 node:

      [zuul@controller-0 ~]$ oc rsh ovsdbserver-sb-0 ovn-sbctl list chassis f8732844-104a-47b9-906b-920378b6a6e9 | grep hostname hostname : networker-1.ctlplane.example.com

       

      The networker-1 ovn-bgp-agent logs don't show any relevant info during that time:

      2024-06-04 10:29:36.973 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Ensuring VRF configuration for advertising routes frr_sync /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:177ESC[00m 2024-06-04 10:29:36.977 2 INFO ovn_bgp_agent.drivers.openstack.utils.frr [-] Add VRF leak for VRF bgp-vrf on router bgp 64999ESC[00m 2024-06-04 10:29:37.090 2 DEBUG oslo_concurrency.lockutils [-] Lock "nbbgp" "released" by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.frr_sync" :: held 0.117s inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:423ESC[00m 2024-06-04 10:29:51.986 2 INFO ovn_bgp_agent.agent [-] Running reconciliation loop to ensure frr configuration is in place.ESC[00m 2024-06-04 10:29:51.986 2 DEBUG oslo_concurrency.lockutils [-] Acquiring lock "nbbgp" by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.frr_sync" inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:404ESC[00m 2024-06-04 10:29:51.987 2 DEBUG oslo_concurrency.lockutils [-] Lock "nbbgp" acquired by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.frr_sync" :: waited 0.000s inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:409ESC[00m

       

      It exposes the GW IP later, when the re-sync is executed:

      2024-06-04 10:31:11.366 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Syncing current routes. sync /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:192ESC[00m
      2024-06-04 10:31:11.367 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Adding BGP route for logical port with ip ['192.168.133.231'] _expose_ip /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:419ESC[00m
      2024-06-04 10:31:11.377 2 DEBUG ovn_bgp_agent.utils.linux_net [-] Creating route at table 168: {'dst': '192.168.133.231', 'dst_len': 32, 'oif': 7, 'table': 168, 'proto': 3, 'scope': 253} add_ip_route /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:772ESC[00m
      2024-06-04 10:31:11.380 2 DEBUG ovn_bgp_agent.utils.linux_net [-] Route created at table 168: {'dst': '192.168.133.231', 'dst_len': 32, 'oif': 7, 'table': 168, 'proto': 3, 'scope': 253} add_ip_route /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:774ESC[00m

       

      The test failed because the VM could not ping an external IP (the pings could not be replied). The GW IP should be exposed when it is created, before the re-sync is run.

            ltomasbo@redhat.com Luis Tomas Bolivar
            eolivare Eduardo Olivares Toledo
            Eduardo Olivares Toledo Eduardo Olivares Toledo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: