summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2013-06-21 14:58:23 +0530
committerVijay Bellur <vbellur@redhat.com>2013-06-28 02:43:47 -0700
commitfdc83183263e04bee56672e9d9922cc9457146cb (patch)
tree26149f65e1719d8f1633e60e14f3d9d762da143f /xlators/nfs
parent0c05cde4a16c426089933803d082183227422307 (diff)
nfs: exit when all volumes are disabled
Instead of triggering 4-5 error logs, when nfs is disabled for all volumes, exit the process. Change-Id: Ib286f143c4f74ba22f502aca0e7dcd0907db6563 BUG: 976750 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/5245 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/nfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/nfs/server/src/nfs.c b/xlators/nfs/server/src/nfs.c
index 6cd0594e691..c3a76c63e30 100644
--- a/xlators/nfs/server/src/nfs.c
+++ b/xlators/nfs/server/src/nfs.c
@@ -533,10 +533,11 @@ nfs_init_state (xlator_t *this)
if (!this)
return NULL;
- if ((!this->children) || (!this->children->xlator)) {
- gf_log (GF_NFS, GF_LOG_ERROR, "nfs must have at least one"
- " child subvolume");
- return NULL;
+ if (!this->children) {
+ gf_log (GF_NFS, GF_LOG_INFO,
+ "NFS is manually disabled: Exiting");
+ /* Nothing for nfs process to do, exit cleanly */
+ kill (getpid (), SIGTERM);
}
nfs = GF_CALLOC (1, sizeof (*nfs), gf_nfs_mt_nfs_state);