summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-02-13 15:46:24 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-17 10:18:49 -0500
commit324268b61a197389012304ee4223629965c0261c (patch)
treed904f9d115f1d8de028572f59856c5299172dca2
parent63b7da69967a0c63c6c5a82b6be651c520a5e97c (diff)
glusterd : Fix for error mesage while detaching peers
When peer is detached from a cluster, an error log is being generated in glusterd.log -"Failed to reconfigure all daemon services". This log is seen in the originator node where the detach is issued. This happens in two cases. Case 1: Detach peer with no volume been created in cluster. Case 2: Detach peer after deleting all the volumes which were created but never started. In any one of the above two cases, in glusterd_check_files_identical() GlusterD fails to retrieve nfs-server.vol file from /var/lib/glusterd/nfs which gets created only when a volume is in place and and is started. With this fix both the above cases have been handled by added validation to skip reconfigure if there is no volume in started state. > Reviewed-on: https://review.gluster.org/16607 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Tested-by: Atin Mukherjee <amukherj@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit be44a1bd519af69b21acf682b0908d4d695f868e) Change-Id: I039c0840e3d61ab54575e1e00c6a6a00874d84c0 BUG: 1423406 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/16645 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-nfs-svc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
index c6ab0c5d521..da343420790 100644
--- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
+++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c
@@ -145,17 +145,32 @@ glusterd_nfssvc_reconfigure ()
xlator_t *this = NULL;
glusterd_conf_t *priv = NULL;
gf_boolean_t identical = _gf_false;
+ gf_boolean_t vol_started = _gf_false;
+ glusterd_volinfo_t *volinfo = NULL;
this = THIS;
GF_VALIDATE_OR_GOTO (this->name, this, out);
priv = this->private;
GF_VALIDATE_OR_GOTO (this->name, priv, out);
+
+ cds_list_for_each_entry (volinfo, &priv->volumes, vol_list) {
+ if (GLUSTERD_STATUS_STARTED == volinfo->status) {
+ vol_started = _gf_true;
+ break;
+ }
+ }
+ if (!vol_started) {
+ ret = 0;
+ goto out;
+ }
+
/*
* Check both OLD and NEW volfiles, if they are SAME by size
* and cksum i.e. "character-by-character". If YES, then
* NOTHING has been changed, just return.
*/
+
ret = glusterd_svc_check_volfile_identical (priv->nfs_svc.name,
build_nfs_graph,
&identical);