Patchwork [BUG:1602,1/2] Volume stop/start fails sometimes

login
register
Submitter shishir gowda
Date 2010-09-15 07:32:05
Message ID <20100915073204.GA21220@dev.gluster.com>
Download mbox | patch
Permalink /patch/4790/
State Accepted
Headers show

Comments

shishir gowda - 2010-09-15 07:32:05
If the pid file is not present, do not fail the volume stop.

Signed-off-by: shishir gowda <shishirng@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd-utils.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index f85fe2b..4ef0bd1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -866,6 +866,11 @@  glusterd_volume_stop_glusterfs (glusterd_volinfo_t  *volinfo,
         if (!file) {
                 gf_log ("", GF_LOG_ERROR, "Unable to open pidfile: %s",
                                 pidfile);
+                if (errno == ENOENT) {
+                        gf_log ("",GF_LOG_TRACE, "volume may not be running");
+                        ret = 0;
+                        goto out;
+                }
                 ret = -1;
                 goto out;
         }