Fix issue of interface becoming inactive even when it was active.
Issue
Agent interface was marked as “os_oper_state = down” even when the state of the interface in OS was Up. This can happen when agent index for interface is reused for a different interface and OS notification for old interface comes after notification for new interface.
Fix
As soon as we see the delete of interface, mark its index as invalid in VnswInterfaceListenerBase so that it cannot be used in updates until Add is seen again. Also when add is seen update the index in VnswInterfaceListenerBase before equeuing notification for resync of OS attributes. Also re-read OS index for interface whenever notification enqueued by VnswInterfaceListenerBase is processed.
Also define tracebuffer for logging VnswIf events. Also increase the size of tracebuffer for Config tracebuffer.
Reviewed: https:/ /review. opencontrail. org/20464 github. org/Juniper/ contrail- controller/ commit/ 81f9ae55b78cfbc bc7ee9eadbc7070 743075775c
Committed: http://
Submitter: Zuul
Branch: master
commit 81f9ae55b78cfbc bc7ee9eadbc7070 743075775c
Author: ashoksingh <email address hidden>
Date: Fri May 20 23:07:33 2016 +0530
Fix issue of interface becoming inactive even when it was active.
Issue
Agent interface was marked as “os_oper_state = down” even when the state of the interface in OS was Up. This can happen when agent index for interface is reused for a different interface and OS notification for old interface comes after notification for new interface.
Fix stenerBase so that it cannot be used in updates until Add is seen again. Also when add is seen update the index in VnswInterfaceLi stenerBase before equeuing notification for resync of OS attributes. Also re-read OS index for interface whenever notification enqueued by VnswInterfaceLi stenerBase is processed.
As soon as we see the delete of interface, mark its index as invalid in VnswInterfaceLi
Also define tracebuffer for logging VnswIf events. Also increase the size of tracebuffer for Config tracebuffer.
Change-Id: I8811edcc89a809 c179d860fb65833 24b9816fb69
Closes-Bug: #1506997