summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorGaurav Yadav <gyadav@redhat.com>2017-02-13 15:46:24 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-02-13 20:42:10 -0500
commitbe44a1bd519af69b21acf682b0908d4d695f868e (patch)
tree06a8555186e09fe78049de41f27f7594e0ec35b8 /xlators/mgmt/glusterd/src
parent25fc74f9d1f2b1e7bab76485a99f27abadd10b7b (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. Change-Id: I039c0840e3d61ab54575e1e00c6a6a00874d84c0 BUG: 1421607 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> 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>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-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);