diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-ganesha.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-ganesha.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c index 73e54d627bf..4e2008b9c69 100644 --- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c +++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c @@ -666,14 +666,19 @@ start_ganesha (char **op_errstr) } } - ret = priv->nfs_svc.stop (&(priv->nfs_svc), SIGKILL); - if (ret) { - ret = -1; - gf_asprintf (op_errstr, "Gluster-NFS service could" - "not be stopped, exiting."); - goto out; + /* If the nfs svc is not initialized it means that the service is not + * running, hence we can skip the process of stopping gluster-nfs + * service + */ + if (priv->nfs_svc.inited) { + ret = priv->nfs_svc.stop (&(priv->nfs_svc), SIGKILL); + if (ret) { + ret = -1; + gf_asprintf (op_errstr, "Gluster-NFS service could" + "not be stopped, exiting."); + goto out; + } } - if (check_host_list()) { ret = manage_service ("start"); if (ret) |