summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-mgmt.c
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2012-07-25 23:24:11 -0700
committergluster-ant <bugzilla-bot@gluster.org>2012-07-25 23:24:11 -0700
commit849ca775ee5c89bdc085cb0f772a8c28844eb34a (patch)
treec05f3c9cfd21946ee26c9fbc54faab7391cf40da /api/src/glfs-mgmt.c
parent921d9c240410bbcda5f4ea8d877b39a999e2e45e (diff)
downloadglusterfs-849ca775ee5c89bdc085cb0f772a8c28844eb34a.tar.gz
glusterfs-849ca775ee5c89bdc085cb0f772a8c28844eb34a.tar.xz
glusterfs-849ca775ee5c89bdc085cb0f772a8c28844eb34a.zip
gfapi: let glfs_init() return on non-RPC errors
Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3732 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api/src/glfs-mgmt.c')
-rw-r--r--api/src/glfs-mgmt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index 8283bd3fe5..2ead93863b 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -392,6 +392,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
int ret = 0;
ssize_t size = 0;
FILE *tmpfp = NULL;
+ int need_retry = 0;
struct glfs *fs = NULL;
frame = myframe;
@@ -400,6 +401,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count,
if (-1 == req->rpc_status) {
ret = -1;
+ need_retry = 1;
goto out;
}
@@ -482,6 +484,8 @@ out:
gf_log ("glfs-mgmt", GF_LOG_ERROR,
"failed to fetch volume file (key:%s)",
ctx->cmd_args.volfile_id);
+ if (!need_retry)
+ glfs_init_done (fs, -1);
}
if (tmpfp)