With Xenial (and maybe older versions), the modified timestamps
in /sys/class/net/(device_name) are not stable. They appear to
work for a period of time, and then when some kind of cache clears
on the kernel side, all of the timestamps are reset to the latest
access time.
This was causing the Linux Bridge agent to think that the interfaces
were experiencing local changes much more frequently than they actually
were, resulting in more polling to the Neutron server and subsequently
more BUILD->ACTIVE->BUILD->ACTIVE transitions in the logical model.
The purpose of the timestamp patch was to catch rapid server REBUILD
operations where the interface would be deleted and re-added within
a polling interval. Without it, these would be stuck in the BUILD
state since the agent wouldn't realize it needed to wire the ports.
This patch switches to looking at the IFINDEX of the interfaces to
use as a sort of logical timestamp. If an interface gets removed
and readded, it will get a different index, so the original timestamp
comparison logic will still work.
In the future, the agent should undergo a larger refactor to just
watch 'ip monitor' for netlink events to replace the polling of the
interface listing and the timestamp logic entirely. However, this
approach was taken due to the near term release and the ability to
back-port it to older releases.
This was verified with both Nova rebuild actions and Nova interface
attach/detach actions.
Reviewed: https:/ /review. openstack. org/369179 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=a2bd0b4b53d b8468681eb2905e 2fbc2f9073869a
Committed: https:/
Submitter: Jenkins
Branch: master
commit a2bd0b4b53db846 8681eb2905e2fbc 2f9073869a
Author: Kevin Benton <email address hidden>
Date: Mon Sep 12 22:27:33 2016 -0700
LinuxBridge: Use ifindex for logical 'timestamp'
With Xenial (and maybe older versions), the modified timestamps net/(device_ name) are not stable. They appear to
in /sys/class/
work for a period of time, and then when some kind of cache clears
on the kernel side, all of the timestamps are reset to the latest
access time.
This was causing the Linux Bridge agent to think that the interfaces ACTIVE- >BUILD- >ACTIVE transitions in the logical model.
were experiencing local changes much more frequently than they actually
were, resulting in more polling to the Neutron server and subsequently
more BUILD->
The purpose of the timestamp patch was to catch rapid server REBUILD
operations where the interface would be deleted and re-added within
a polling interval. Without it, these would be stuck in the BUILD
state since the agent wouldn't realize it needed to wire the ports.
This patch switches to looking at the IFINDEX of the interfaces to
use as a sort of logical timestamp. If an interface gets removed
and readded, it will get a different index, so the original timestamp
comparison logic will still work.
In the future, the agent should undergo a larger refactor to just
watch 'ip monitor' for netlink events to replace the polling of the
interface listing and the timestamp logic entirely. However, this
approach was taken due to the near term release and the ability to
back-port it to older releases.
This was verified with both Nova rebuild actions and Nova interface
attach/detach actions.
Change-Id: I016019885446bf f6806268ab49cd5 476d93ec61f
Closes-Bug: #1622833