diff options
author | Amar Tumballi <amarts@redhat.com> | 2017-10-22 12:41:38 +0530 |
---|---|---|
committer | jiffin tony Thottan <jthottan@redhat.com> | 2017-11-06 11:43:04 +0000 |
commit | a3aff30d92f8858b7acf3d7fb421e2a0a4dd7a79 (patch) | |
tree | e6ad575a3f271bbb640f875ac0f83cef865a47aa /xlators/protocol | |
parent | b0790bc6ee41fc8a4a9ee5591169a1d8eca3f20d (diff) |
protocol/client: handle the subdir handshake properly for add-brick
There should be different way we handle handshake in case of subdir
mount for the first time, and in case of subsequent graph changes.
Change-Id: I2a7ba836433bb0a0f4a861809e2bb0d7fbc4da54
BUG: 1505323
Signed-off-by: Amar Tumballi <amarts@redhat.com>
(cherry picked from commit 9aa574a51b84717c1f3949ed2e28a49e49840a93)
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/client/src/client-handshake.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index b6dc0797dd9..aee6b3a179d 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1079,10 +1079,14 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m int32_t op_errno = 0; gf_boolean_t auth_fail = _gf_false; uint32_t lk_ver = 0; + glusterfs_ctx_t *ctx = NULL; frame = myframe; this = frame->this; conf = this->private; + GF_VALIDATE_OR_GOTO (this->name, conf, out); + ctx = this->ctx; + GF_VALIDATE_OR_GOTO (this->name, ctx, out); if (-1 == req->rpc_status) { gf_msg (frame->this->name, GF_LOG_WARNING, ENOTCONN, @@ -1145,9 +1149,13 @@ client_setvolume_cbk (struct rpc_req *req, struct iovec *iov, int count, void *m auth_fail = _gf_true; op_ret = 0; } - if ((op_errno == ENOENT) && this->ctx->cmd_args.subdir_mount) { + if ((op_errno == ENOENT) && this->ctx->cmd_args.subdir_mount && + (ctx->graph_id <= 1)) { /* A case of subdir not being present at the moment, ride on auth_fail framework to notify the error */ + /* Make sure this case is handled only in the new + graph, so mount may fail in this case. In case + of 'add-brick' etc, we need to continue retry */ auth_fail = _gf_true; op_ret = 0; } |