glusterd: create nfs volfile even when NFS is disabled on all volumes

This is required to determine if gluster-nfs daemon needs to be
restarted. With http://review.gluster.org/9835 gluster-nfs volfile
wouldn't be created if all volumes had nfs disabled before they were
started even once. With the existing code, we wouldn't be able to
determine if gluster-nfs needs to be restarted or reconfigured without
the gluster-nfs volfile. This fix is ensure that we generate the
gluster-nfs volfile even if it wouldn't be started, to honour the above
requirement.

Change-Id: I86c6707870d838b03dd4d14b91b984cb43c33006
BUG: 1199944
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/9851
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
This commit is contained in:
Krishnan Parthasarathi 2015-03-10 19:27:50 +05:30 committed by Vijay Bellur
parent 219512c501
commit 381abb5bd2

View File

@ -164,7 +164,7 @@ glusterd_nfssvc_manager (glusterd_svc_t *svc, void *data, int flags)
{
int ret = -1;
if (!glusterd_nfssvc_need_start ()) {
if (glusterd_are_all_volumes_stopped ()) {
ret = svc->stop (svc, SIGKILL);
} else {