This is a hack, but it makes the set of controller connection states identical
to the manager connection states from the point of view of the status columns
in the Controller and Manager tables.
---
ofproto/ofproto.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index c7872ba..a502938 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -1393,8 +1393,11 @@ ofproto_get_ofproto_controller_info(const struct ofproto
* ofproto,
}
cinfo->pairs.keys[cinfo->pairs.n] = "state";
+ /* Munge CONNECTING to CONNECT_IN_PROGRESS to make controller states
+ * identical to OVSDB manager states. */
cinfo->pairs.values[cinfo->pairs.n++] =
- xstrdup(rconn_get_state(rconn));
+ xstrdup(strcmp(rconn_get_state(rconn), "CONNECTING")
+ ? rconn_get_state(rconn) : "CONNECT_IN_PROGRESS");
if (rconn_is_admitted(rconn)) {
cinfo->pairs.keys[cinfo->pairs.n] = "time_connected";
--
1.7.2.3
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev