From 316e3300cfaa646b7fa45fcc7f57b81c7bb15a0e Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Tue, 2 May 2017 11:46:11 +0530 Subject: glusterd: skip nfs svc reconfigure if nfs xlator is not installed With 83abcba, nfs svc is not (re)started or stopped if NFS so file is not installed. However the same check was missing in nfs svc reconfigure which was causing all volume set command to fail. Change-Id: Ie87b5dba44ac59e890cbd60f85944f8e685ad52b BUG: 1326219 Signed-off-by: Atin Mukherjee Reviewed-on: https://review.gluster.org/17149 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Niels de Vos CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-nfs-svc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c index bff4c6cf5d5..32b1064c002 100644 --- a/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-nfs-svc.c @@ -156,6 +156,15 @@ glusterd_nfssvc_reconfigure () priv = this->private; GF_VALIDATE_OR_GOTO (this->name, priv, out); + /* not an error, or a (very) soft error at best */ + if (sys_access (XLATORDIR "/nfs/server.so", R_OK) != 0) { + gf_msg (THIS->name, GF_LOG_INFO, 0, + GD_MSG_GNFS_XLATOR_NOT_INSTALLED, + "nfs/server.so xlator is not installed"); + ret = 0; + goto out; + } + cds_list_for_each_entry (volinfo, &priv->volumes, vol_list) { if (GLUSTERD_STATUS_STARTED == volinfo->status) { vol_started = _gf_true; -- cgit