vswitchd: Adding and removing mgmt interface breaks connection
authorJustin Pettit <jpettit@nicira.com>
Thu, 25 Jun 2009 01:03:44 +0000 (18:03 -0700)
committerJustin Pettit <jpettit@nicira.com>
Thu, 25 Jun 2009 01:03:44 +0000 (18:03 -0700)
When a managment connection is configured and then removed, putting it
back causes the management connection to never be reestablished.  The
management code checks whether the configuration file has changed before
it attempts to reconfigure itself.  If the only thing that changed was
the lack of a management connection, then it tore down the connection
but didn't update its view of the configuration.  When the same
manager IP is configured, the cached version matches the new version, so
no changes are made.  This commit clears the cached version, so that a
removing and then adding the manager will be detected as a change.

Bug #1448

vswitchd/mgmt.c

index a65934b..ce9d9f3 100644 (file)
@@ -131,6 +131,7 @@ mgmt_reconfigure(void)
     int retval;
 
     if (!cfg_has_section("mgmt")) {
+        svec_clear(&mgmt_cfg);
         if (mgmt_rconn) {
             rconn_destroy(mgmt_rconn);
             mgmt_rconn = NULL;