F5Networks / f5-openstack-agent

The F5 Agent for OpenStack Neutron allows you to deploy BIG-IP services in an OpenStack environment.
http://clouddocs.f5.com/products/openstack/agent/latest
Apache License 2.0
14 stars 38 forks source link

update_fdb_entries in agent_manager.py does not expect proper data structure from neturon #782

Closed pjbreaux closed 7 years ago

pjbreaux commented 7 years ago

OpenStack Release

liberty, but the fix should go forward

Description

When l2population is configured in the neutron ml2 plugin, the ovs agent will notify the agent_manager when fdb entries need to be updated for a given port. This can happen when a fixed_ip address changes for a port. The data structure that is cast out from the l2pop mech driver is not what the update_fdb_entries function call in the agent_manager.py expects. This produces a python KeyError, but that exception is somewhat hidden by a catchall Except Exception as exc statement.

The agent needs to expect the correct dictionary on the fdb update and take action accordingly to update fdb entries, if necessary. The exception statement in agent_manager.py should also at least reflect the actual exception that it saw, instead of logging only the exception message value and moving on. This will give a user more context around the failure, if one occurs.

A few unit tests can be written for this, and possibly a new neutronless test to simulate the fdb update message from the l2pop mech driver.

pjbreaux commented 7 years ago

@jlongstaf: fyi about this issue

pjbreaux commented 7 years ago

Okay, after doing some research into this issue, I've come to a few points of clarification.

  1. The only way I see an update_fdb_entries message kicked from neutron is in the case that the member IP address has changed through a neutron port update command.
  2. In the case that the member IP address is changed via step 1 above, we actually make no change on the BIG-IP device. An fdb entry does not contain the IP address of the member.
  3. If the member address changes in neutron, we must update neutron-lbaas to that fact (this is not in the scope of this issue).

This is closely related to another issue #918.