Take down edge ports on a leaf switch when all uplinks are gone
- Bug fix for case when all uplinks are gone, but dual-homed host continues to send packets to switch;
We now administratively take down the host port to force the host to use the other leaf in the pair.
- Restructured SR manager by creating a LinkHandler
- fixed/added some log messages
Change-Id: I3722cd364dc8798b16891519bec165627e92bd87
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
index 8b240e6..fd57f09 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java
@@ -161,8 +161,8 @@
// Route path handling
//////////////////////////////////////
- /* The following three methods represent the three major ways in routing
- * is triggered in the network
+ /* The following three methods represent the three major ways in which
+ * route-path handling is triggered in the network
* a) due to configuration change
* b) due to route-added event
* c) due to change in the topology
@@ -416,11 +416,11 @@
routeChanges = computeRouteChange();
// deal with linkUp of a seen-before link
- if (linkUp != null && srManager.isSeenLink(linkUp)) {
- if (!srManager.isBidirectional(linkUp)) {
+ if (linkUp != null && srManager.linkHandler.isSeenLink(linkUp)) {
+ if (!srManager.linkHandler.isBidirectional(linkUp)) {
log.warn("Not a bidirectional link yet .. not "
+ "processing link {}", linkUp);
- srManager.updateSeenLink(linkUp, true);
+ srManager.linkHandler.updateSeenLink(linkUp, true);
populationStatus = Status.ABORTED;
return;
}
@@ -436,7 +436,7 @@
// now that we are past the check for a previously seen link
// it is safe to update the store for the linkUp
if (linkUp != null) {
- srManager.updateSeenLink(linkUp, true);
+ srManager.linkHandler.updateSeenLink(linkUp, true);
}
//deal with switchDown