From 5ec6690ca447dd25e3d04b60ca66d2e6e1cf37f2 Mon Sep 17 00:00:00 2001
From: Justin Pettit <jpettit@nicira.com>
Date: Mon, 10 Aug 2009 18:09:33 -0700
Subject: [PATCH] secchan: Clarify log message about failing open.

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/secchan/fail-open.c b/secchan/fail-open.c
index 0e8872937..60890d496 100644
--- a/secchan/fail-open.c
+++ b/secchan/fail-open.c
@@ -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
-- 
2.47.0