← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2073403] Re: [NB driver] Error raised when VM created with a port attached to a FIP

 

This is a bug in Neutron that it doesn't set the external_mac until the
FIP is up.

** Project changed: ovn-bgp-agent => neutron

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2073403

Title:
  [NB driver] Error raised when VM created with a port attached to a FIP

Status in neutron:
  In Progress

Bug description:
  This issue is NOT reproduced when:
  - a VM is created
  - a FIP is attached to that VM's port

  It is reproduced when:
  - a port is created
  - a FIP is attached to that port
  - a VM is created with that port

  Hence, the bug can be reproduced with the following commands:
  $ openstack port create --network n0 p0
  $ openstack floating ip create --port p0 public
  $ openstack server create --image im0 --flavor m1.micro --port p0 vm0

  Then, the following error is raised:
  2024-07-17 10:25:18.067 2 DEBUG ovsdbapp.backend.ovs_idl.event [-] Matched UPDATE: LogicalSwitchPortFIPCreateEvent(events=('update',), table='Logical_Switch_Port', conditions=None, old_conditions=None), priority=20 to row=Logical_Switch_Port(port_security=[], addresses=['fa:16:3e:2b:61:32 10.100.0.129 fc00::f816:3ef
  f:fe2b:6132', 'unknown'], type=, dhcpv4_options=[<ovs.db.idl.Row object at 0x7f52e858da90>], name=291a61b2-b156-4805-b400-2c777041f43f, up=[True], options={'requested-chassis': 'compute-2.ctlplane.example.com'}, ha_chassis_group=[], external_ids={'neutron:cidrs': '10.100.0.129/24 fc00::f816:3eff:fe2b:6132/64', 'neut
  ron:device_id': '1d6d4206-798a-4344-ab4a-74b5dc89d511', 'neutron:device_owner': 'compute:nova', 'neutron:mtu': '', 'neutron:network_name': 'neutron-8e52808c-9d23-48d5-9598-bc11a8a25178', 'neutron:port_capabilities': '', 'neutron:port_name': 'tobiko.tests.sanity.nova.test_server.CrateDeleteServerStackFixture-port-kqg
  yesyd2l2q', 'neutron:project_id': '7cb7cf58061743b39ca02f6b611c9934', 'neutron:revision_number': '2', 'neutron:security_group_ids': '', 'neutron:subnet_pool_addr_scope4': '', 'neutron:subnet_pool_addr_scope6': '', 'neutron:vnic_type': 'normal', 'neutron:port_fip': '192.168.133.202'}, dynamic_addresses=[], tag=[], pa
  rent_name=[], mirror_rules=[], tag_request=[], enabled=[True], dhcpv6_options=[]) old=Logical_Switch_Port(up=[False]) matches /usr/lib/python3.9/site-packages/ovsdbapp/backend/ovs_idl/event.py:43ESC[00m
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher [-] Unexpected exception while running the event action: IndexError: list index out of range
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher Traceback (most recent call last):
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher   File "/usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/watchers/base_watcher.py", line 28, in run
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher     self._run(*args, **kwargs)
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher   File "/usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/watchers/nb_bgp_watcher.py", line 219, in _run
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher     self.agent.get_port_external_ip_and_ls(row.name))
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher   File "/usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py", line 560, in get_port_external_ip_and_ls
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher     return nat_entry.external_ip, nat_entry.external_mac[0], ls_name
  2024-07-17 10:25:18.068 2 ERROR ovn_bgp_agent.drivers.openstack.watchers.base_watcher IndexError: list index out of range

  
  The FIP is not exposed when the VM is created due to this error, but it is exposed later, when the periodic sync is run:
  2024-07-17 10:26:13.263 2 DEBUG oslo_concurrency.lockutils [-] Acquiring lock "nbbgp" by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.sync" inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:404ESC[00m
  2024-07-17 10:26:13.263 2 DEBUG oslo_concurrency.lockutils [-] Lock "nbbgp" acquired by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.sync" :: waited 0.000s inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:409ESC[00m
  2024-07-17 10:26:13.263 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Configuring default wiring for each provider network sync /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:185ESC[00m
  2024-07-17 10:26:13.264 2 DEBUG ovn_bgp_agent.utils.linux_net [-] Found routing table for br-ex with: 75 ensure_routing_table_for_bridge /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:232ESC[00m
  2024-07-17 10:26:13.290 2 DEBUG ovn_bgp_agent.utils.linux_net [-] IP 169.254.0.1 already added on bridge br-ex ensure_arp_ndp_enabled_for_bridge /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:147ESC[00m
  2024-07-17 10:26:13.294 2 DEBUG ovn_bgp_agent.utils.linux_net [-] IP fd53:d91e:400:7f17::1 already added on bridge br-ex ensure_arp_ndp_enabled_for_bridge /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:147ESC[00m
  2024-07-17 10:26:13.401 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-07-17 10:26:13.405 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Adding BGP route for FIP with ip 192.168.133.202 _expose_fip /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:589ESC[00m
  2024-07-17 10:26:13.417 2 DEBUG ovn_bgp_agent.utils.linux_net [-] Creating route at table 75: {'dst': '192.168.133.202', 'dst_len': 32, 'oif': 7, 'table': 75, 'proto': 3, 'scope': 253} add_ip_route /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:774ESC[00m
  2024-07-17 10:26:13.423 2 DEBUG ovn_bgp_agent.utils.linux_net [-] Route created at table 75: {'dst': '192.168.133.202', 'dst_len': 32, 'oif': 7, 'table': 75, 'proto': 3, 'scope': 253} add_ip_route /usr/lib/python3.9/site-packages/ovn_bgp_agent/utils/linux_net.py:776ESC[00m
  2024-07-17 10:26:13.441 2 DEBUG ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver [-] Added BGP route for FIP with ip 192.168.133.202 _expose_fip /usr/lib/python3.9/site-packages/ovn_bgp_agent/drivers/openstack/nb_ovn_bgp_driver.py:594ESC[00m
  2024-07-17 10:26:13.484 2 DEBUG oslo_concurrency.lockutils [-] Lock "nbbgp" "released" by "ovn_bgp_agent.drivers.openstack.nb_ovn_bgp_driver.NBOVNBGPDriver.sync" :: held 0.221s inner /usr/lib/python3.9/site-packages/oslo_concurrency/lockutils.py:423ESC[00m

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2073403/+subscriptions