aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Pettit <jpettit@nicira.com>2009-06-24 18:03:44 -0700
committerJustin Pettit <jpettit@nicira.com>2009-06-24 18:03:44 -0700
commit7c77c24dbd2563df398ae15f04304fe7a2f3c659 (patch)
treec8e096d04a1ed3be5896a4a782bca848c0b4d878
parent083652d4017d11617690afc7f4a7c1c5cda48b2e (diff)
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
-rw-r--r--vswitchd/mgmt.c1
1 files changed, 1 insertions, 0 deletions
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;