From 7c77c24dbd2563df398ae15f04304fe7a2f3c659 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Wed, 24 Jun 2009 18:03:44 -0700 Subject: [PATCH] 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 --- vswitchd/mgmt.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2