yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #96546
[Bug 2126570] [NEW] DHCP agent - created port not stored in cache, may cause "stale"
Public bug reported:
In the DHCP agent, file neutron/agent/dhcp/agent.py method
configure_dhcp_for_network, the enable driver is called upon the network
but the network object is not refreshed before being cached. In the
event the driver creates a DHCP port because it does not exist, it will
not be cached. Thus, if a clean_devices cleanup is called on the
outdated network object (which is the case for example when a request to
delete a port happens and the port is not found), the created port will
be considered stale because not in cache and in turn deleted when it
should not be.
To trigger and reproduce:
Have or create a DHCP-enabled network
Pick any DHCP port in that network and locate the DHCP agent
If the DHCP agent was restarted after the creation of the port, then delete the port conventionally and wait for a new port to be created
Create an oslo notification of type "port_delete_end" with a payload containing the network_id and a non-existent port_id
Ensure the port_delete_end notification is acknowledged by the agent
Since the port was created during the DHCP agent's runtime, the cache
will not contain an up-to-date network object; the device will be
wrongfully deleted ("Found stale device %s, deleting" will be logged)
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2126570
Title:
DHCP agent - created port not stored in cache, may cause "stale"
Status in neutron:
New
Bug description:
In the DHCP agent, file neutron/agent/dhcp/agent.py method
configure_dhcp_for_network, the enable driver is called upon the
network but the network object is not refreshed before being cached.
In the event the driver creates a DHCP port because it does not exist,
it will not be cached. Thus, if a clean_devices cleanup is called on
the outdated network object (which is the case for example when a
request to delete a port happens and the port is not found), the
created port will be considered stale because not in cache and in turn
deleted when it should not be.
To trigger and reproduce:
Have or create a DHCP-enabled network
Pick any DHCP port in that network and locate the DHCP agent
If the DHCP agent was restarted after the creation of the port, then delete the port conventionally and wait for a new port to be created
Create an oslo notification of type "port_delete_end" with a payload containing the network_id and a non-existent port_id
Ensure the port_delete_end notification is acknowledged by the agent
Since the port was created during the DHCP agent's runtime, the cache
will not contain an up-to-date network object; the device will be
wrongfully deleted ("Found stale device %s, deleting" will be logged)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2126570/+subscriptions