[CONTROLLER-531] Can't detect switch disconnection Created: 02/Jun/14 Updated: 25/Jul/23 Resolved: 15/Jul/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | mdsal |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jim O | Assignee: | Tony Tkacik |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| External issue ID: | 1125 |
| Description |
|
To detect when a switch disconnects, I register a datachangelistener on InstanceIdentifier.builder(Nodes.class).child(Node.class).augmentation(FlowCapableNode.class) Then I get the set from changeEvent.getRemovedOperationalData() and see if it is a FlowCapableNode. If it is, I take that to mean the node has disconnected. This was working in builds from April but is no longer working. I'm not getting any notifications when a switch disconnects. Here are some code snippets: dataChangeListenerRegistration = dataBrokerService.registerDataChangeListener(InstanceIdentifier.builder(Nodes.class) final Set<InstanceIdentifier<?>> removedSet = changeEvent.getRemovedOperationalData(); for (final InstanceIdentifier<?> removedItemPath : removedSet) if (className.contains("FlowCapableNode")) |
| Comments |
| Comment by Ed Warnicke [ 03/Jun/14 ] |
|
This may or may not be an MD-SAL issue... hard to say. The simplest way to approach it would be to: a) Create a unit test to write an operational node, remove it, and see if the datachange listener fires. |
| Comment by Tony Tkacik [ 14/Jul/14 ] |
|
Tried to replicate with current master, seems to work, |