- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Device And Link Removal (Thread Control)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2016 12:39 PM
тАО07-05-2016 12:39 PM
When a device is removed from my topology, I want to iterate all its existing links and do something with the neighboring devices on the other end of the links. The problem is that device notifications and link removal run in separate threads. That is, my callback method that detects a device has been removed can or cannot iterate the removed device's links depending on whether or not the links have already been removed. Can I programatically control this? Is there some object I can syncrhonize on to guarantee that I will be able to read links before they are removed in one of these device removal notifications?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-05-2016 02:22 PM - edited тАО07-05-2016 02:22 PM
тАО07-05-2016 02:22 PM - edited тАО07-05-2016 02:22 PM
SolutionI don't think there's a way to get the threads which run device removal and link removal to synchronize with eachother, but I think there are a few options to accomplish your goal. In both options I can think of, you'd need to register a LinkListener with the LinkService:
- Cache a copy of the links that are created, each time your LInkListener receives a LINK_ADDED event. When you receive a DeviceListener notification that a device has been removed (or gone offline), then consult your cache to find the links that were active at the time the device was removed.
- When your LinkListener receives a LINK_REMOVED event, check to see if the device still exists or is still online. This will let you infer when a device is removed or goes offline (respectively). At the point you infer this information, you'll still have the link that was removed, so you'll know the neighboring device.
In either case, remember that a link can either be DIRECT_LINK or MULTIHOP_LINK. If you are looking for physical adjacencies, then you'd only want to take action on DIRECT_LINK. If you're looking for logical OF adjacencies, then you'd take action on either link type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-06-2016 12:35 PM
тАО07-06-2016 12:35 PM
Re: Device And Link Removal (Thread Control)
This seems viable. Thank you!