From: Justin Pettit Date: Thu, 25 Jun 2009 01:03:44 +0000 (-0700) Subject: vswitchd: Adding and removing mgmt interface breaks connection X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c77c24dbd2563df398ae15f04304fe7a2f3c659;p=openvswitch vswitchd: Adding and removing mgmt interface breaks connection 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 --- diff --git a/vswitchd/mgmt.c b/vswitchd/mgmt.c index a65934b6..ce9d9f33 100644 --- a/vswitchd/mgmt.c +++ b/vswitchd/mgmt.c @@ -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;