e7a346
From 86db0fb0570a0a0f2b55280c9d1be581f16ab312 Mon Sep 17 00:00:00 2001
e7a346
From: moagrawa <moagrawa@redhat.com>
e7a346
Date: Fri, 15 Dec 2017 17:21:59 +0530
e7a346
Subject: [PATCH 106/128] glusterd: Free up svc->conn on volume delete
e7a346
e7a346
Daemons snapd/tierd is maintained on per volume basis and on a volume
e7a346
delete we should destroy the rpc connection established for the same.
e7a346
e7a346
Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014
e7a346
> BUG: 1522775
e7a346
> Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
> Reviewed on https://review.gluster.org/18957
e7a346
> (Cherry pick from commit 36ce4c614a3391043a3417aa061d0aa16e60b2d3)
e7a346
e7a346
BUG: 1512470
e7a346
Signed-off-by: moagrawa <moagrawa@redhat.com>
e7a346
Change-Id: I21426893bc1c326bf51cb83a68b0ae3c31ea5b9a
e7a346
Reviewed-on: https://code.engineering.redhat.com/gerrit/126230
e7a346
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e7a346
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
e7a346
---
e7a346
 xlators/mgmt/glusterd/src/glusterd-utils.c | 4 ++++
e7a346
 1 file changed, 4 insertions(+)
e7a346
e7a346
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
e7a346
index 1434d64..4b53898 100644
e7a346
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
e7a346
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
e7a346
@@ -1029,6 +1029,10 @@ glusterd_volinfo_delete (glusterd_volinfo_t *volinfo)
e7a346
         if (volinfo->rebal.dict)
e7a346
                 dict_unref (volinfo->rebal.dict);
e7a346
 
e7a346
+        /* Destroy the connection object for per volume svc daemons */
e7a346
+        glusterd_conn_term (&volinfo->snapd.svc.conn);
e7a346
+        glusterd_conn_term (&volinfo->tierd.svc.conn);
e7a346
+
e7a346
         gf_store_handle_destroy (volinfo->quota_conf_shandle);
e7a346
         gf_store_handle_destroy (volinfo->shandle);
e7a346
         gf_store_handle_destroy (volinfo->node_state_shandle);
e7a346
-- 
e7a346
1.8.3.1
e7a346