diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-08-12 03:26:39 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-08-12 02:38:56 -0700 |
commit | e98ebc1da4f49fba2bcaaf3212b00058e615cf29 (patch) | |
tree | 5dde47fdd3651961d2471a7801f4aa474453b486 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | a6a2e3a86c0d4c0873e822a38769677df2050f11 (diff) |
glusterd: Fixes for detach
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 1215 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1215
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index e3337c7d985..c17582341c0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -39,6 +39,7 @@ #include "glusterd.h" #include "glusterd-sm.h" #include "glusterd-utils.h" +#include "glusterd-store.h" #include <sys/resource.h> #include <inttypes.h> @@ -858,6 +859,12 @@ glusterd_peer_destroy (glusterd_peerinfo_t *peerinfo) if (!peerinfo) goto out; + ret = glusterd_store_delete_peerinfo (peerinfo); + + if (ret) { + gf_log ("", GF_LOG_ERROR, "Deleting peer info failed"); + } + list_del_init (&peerinfo->uuid_list); list_for_each_entry_safe (name, tmp, &peerinfo->hostnames, hostname_list) { @@ -867,6 +874,7 @@ glusterd_peer_destroy (glusterd_peerinfo_t *peerinfo) list_del_init (&peerinfo->hostnames); GF_FREE (peerinfo); + peerinfo = NULL; ret = 0; |