Topology manager writes link information everytime topology-lldp-discovery publish the linkAdded/linkRemove notificaiton

Description

In the current implementation of the TopologyManager, it's listening for linkAdded and linkRemoved notification and whenever it receive those notification, it updates the data store. linkAdded and linkRemoved notificaitons are published by topology-lldp-discovery module. Topology-lldp-discovery module will publish this whenever it will receive the lldp packet from the switch. This is not a right behavior, because it's publishing the same linkAdded event everytime it receives the lldp packet. This can cause performance issue when topology is large.

Topology-lldp-discovery module should only publish the linkAdded notification if the link is added first time or removed and added back.

Environment

None

Activity

Show:

Gobinath Suganthan May 9, 2019 at 10:50 AM

Thanks a lot . But I have already figured out the reasons for the failures.

Luis Gomez Palacios May 8, 2019 at 4:03 PM

Tell me what you want to run as test and I can prepare test patch and job in sandbox you can use to validate your patch.

Gobinath Suganthan May 8, 2019 at 8:39 AM

There are still some failures in the job "openflowplugin-csit-1node-gate-flow-services-all-sodium" of openflowplugin CSIT for this review.

I added some logging to debug them but I'm finding difficult to isolate the issues as similar TCs are repeated across the suite and the job itself is time consuming. It would be easier to debug if only the failed TCs can be run.

Could you please guide on how to run only a particular set of sets from the CSIT.

Gobinath Suganthan January 7, 2019 at 12:37 PM
Edited

,  I had a look at this. Andrej Leitner's patch had some CSIT failures related to topology. In the patch, the "linkToDate" cache (already existing) is used to decide whether to send the notification. So, the "linkAdded" notification is sent only when the "linkToDate" cache doesnt have the discovered link. This cache is regularly updated in the following manner(LinkAger):

  1. a) Whenever the lldp pkt is received for a link (lldp interval confgured as 5s), the link is updated with the latest age

  2. b) All the entries are checked for every interval (topology-lldp-expiration-interval which is currently 60s). In the event of the age being expired (time link updated + expiration-interval > currentTime), only then the entry is removed.

 

So, even after the link is removed it would take 60s for the link to e removed from the cache. But if we dont wait for this removal and add the link back, the cache would contain the link after the expiry. So no lldp would be sent thinking that the link was never removed in the first place. So the flapped links wont be discovered.

 

Anil Vishnoi September 10, 2018 at 3:39 PM

Are you still looking at this bug ? If not, can you please un-assign it so we can assign it to someone else?

Done

Details

Assignee

Reporter

Components

Fix versions

Priority

Created July 12, 2018 at 2:05 AM
Updated February 6, 2025 at 2:13 PM
Resolved June 17, 2019 at 3:49 PM