Added log message to assist in discovering the root cause sometimes
there are orphaned Flow Entries in the Network MAP.
It seems the switch itself has a controller, but somehow the controller
doesn't consider itself responsible for that switch.
diff --git a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
index 1a9b70a..d55979e 100644
--- a/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
+++ b/src/main/java/net/floodlightcontroller/flowcache/FlowManager.java
@@ -101,12 +101,12 @@
for (IFlowEntry flowEntryObj : allFlowEntries) {
FlowEntryId flowEntryId =
new FlowEntryId(flowEntryObj.getFlowEntryId());
- String userState = flowEntryObj.getUserState();
- String switchState = flowEntryObj.getSwitchState();
+ String userState = "User State: " + flowEntryObj.getUserState();
+ String switchState = "Switch State: " + flowEntryObj.getSwitchState();
- log.debug("Found Flow Entry {}: ", flowEntryId.toString());
- log.debug("User State {}:", userState);
- log.debug("Switch State {}:", switchState);
+ log.debug("Found Flow Entry {}: {}",
+ flowEntryId.toString(),
+ userState + " " + switchState);
if (! switchState.equals("FE_SWITCH_NOT_UPDATED")) {
// Ignore the entry: nothing to do
@@ -116,7 +116,7 @@
Dpid dpid = new Dpid(flowEntryObj.getSwitchDpid());
IOFSwitch mySwitch = mySwitches.get(dpid.value());
if (mySwitch == null) {
- log.debug("Flow Entry ignored: not my switch");
+ log.debug("Flow Entry ignored: not my switch (FlowEntryId = {} DPID = {})", flowEntryId.toString(), dpid.toString());
continue;
}
myFlowEntries.put(flowEntryId.value(), flowEntryObj);