ovsdb: Log when remote connections are deconfigured.
authorBen Pfaff <blp@nicira.com>
Fri, 15 Jul 2011 18:25:14 +0000 (11:25 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 18 Jul 2011 16:30:31 +0000 (09:30 -0700)
Recently I helped debug a scenario where ovsdb-server connected to a remote
manager, then ovs-vsctl deleted the remote manager and soon after re-added
it.  The log was difficult to interpret because it showed two successful
connection attempts to the same remote without showing a reason why the
connection was dropped in the first place.  Adding this log message would
make it clear that the configuration changed to remove that remote
connection in the meantime.

ovsdb/jsonrpc-server.c

index 1da15785aa939eab9c25cd5441c1177c2e92efcf..e999adafe5f84f79fdec6fccb253ff83c08b2756 100644 (file)
@@ -141,6 +141,7 @@ ovsdb_jsonrpc_server_set_remotes(struct ovsdb_jsonrpc_server *svr,
 
     SHASH_FOR_EACH_SAFE (node, next, &svr->remotes) {
         if (!shash_find(new_remotes, node->name)) {
+            VLOG_INFO("%s: remote deconfigured", node->name);
             ovsdb_jsonrpc_server_del_remote(node);
         }
     }