Blob Blame History Raw
From 2cf7f8a0216b5364e2f96504a45d66bee964a4cc Mon Sep 17 00:00:00 2001
From: moagrawa <moagrawa@redhat.com>
Date: Fri, 15 Dec 2017 17:21:59 +0530
Subject: [PATCH 638/642] glusterd: Free up svc->conn on volume delete

Daemons snapd is maintained on per volume basis and on a volume
delete we should destroy the rpc connection established for the same.

Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014
> BUG: 1522775
> Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
> Reviewed on https://review.gluster.org/18957
> (Cherry pick from commit 36ce4c614a3391043a3417aa061d0aa16e60b2d3)

BUG: 1526363
Signed-off-by: moagrawa <moagrawa@redhat.com>
Change-Id: I82e8d44dc2b33335bd632414a564be53100f0b70
Reviewed-on: https://code.engineering.redhat.com/gerrit/125978
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
---
 xlators/mgmt/glusterd/src/glusterd-utils.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 6288683..b594b9e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -994,6 +994,9 @@ glusterd_volinfo_delete (glusterd_volinfo_t *volinfo)
         if (volinfo->rebal.dict)
                 dict_unref (volinfo->rebal.dict);
 
+        /* Destroy the connection object for per volume svc daemons */
+        glusterd_conn_term (&volinfo->snapd.svc.conn);
+
         gf_store_handle_destroy (volinfo->quota_conf_shandle);
 
         glusterd_auth_cleanup (volinfo);
-- 
2.9.3