secchan: Clarify log message about failing open.
authorJustin Pettit <jpettit@nicira.com>
Tue, 11 Aug 2009 01:09:33 +0000 (18:09 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 11 Aug 2009 17:04:42 +0000 (10:04 -0700)
In commit e10dfcf357 "rconn: Be pickier about what constitutes a
successful connection", the criteria for determining a successful
OpenFlow connection was tightened.  When rconn connects at a socket
level, it prints messages stating that it "connected" and the switch is
taken out of fail-open mode.  If it is determined that it is not a
"successful" OpenFlow connection, then the connection is closed and
fail-open is re-enabled.  When this occurs, fail-open logs the following
potentially confusing message:

    Could not connect to controller for XXX seconds, failing open

Where XXX is the number of seconds since the last "succesful" connection
rather than simple socket-level connection.  This commit changes the
message to:

    Could not establish OpenFlow channel to controller for XXX
    seconds, failing open

Bug #1163

secchan/fail-open.c

index 0e88729..60890d4 100644 (file)
@@ -53,8 +53,9 @@ fail_open_run(struct fail_open *fo)
             memset(&flow, 0, sizeof flow);
             ofproto_delete_flow(fo->ofproto, &flow, OFPFW_ALL, 70000);
         } else {
-            VLOG_WARN("Could not connect to controller for %d seconds, "
-                      "failing open", disconn_secs);
+            VLOG_WARN("Could not connect to controller (or switch failed "
+                      "controller's post-connection admission control "
+                      "policy) for %d seconds, failing open", disconn_secs);
             fo->last_disconn_secs = disconn_secs;
 
             /* Flush all OpenFlow and datapath flows.  We will set up our