diff options
author | zhangxyue <77471026+zhangxyue@users.noreply.github.com> | 2021-02-22 04:05:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 17:35:28 +0530 |
commit | 839e4796d2ea92a97001d1af34837467da4a05cd (patch) | |
tree | bdec8c48ece959268c3e29293226f20b4a53f8df | |
parent | adf95699621f084f2503d8dd15e519bab778906f (diff) | |
download | glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.tar.gz glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.tar.xz glusterfs-839e4796d2ea92a97001d1af34837467da4a05cd.zip |
glusterfs:the mount operation will get stuck when the vol isn't exist (#2177)
when passing wrong volume-name which doesn't exits, it will get stuck.
The errno is 0 inited in glusterd-handshake.c. After initing the errno,
the process blocks in gf_fuse_umount.
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index e202cbf3e9..cb30549bc9 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -2370,6 +2370,7 @@ post_unlock: restart the process */ gf_log("mgmt", GF_LOG_ERROR, "failed to fetch volume file (key:%s)", ctx->cmd_args.volfile_id); + emancipate(ctx, ret); cleanup_and_exit(0); } diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index e831c1a3c5..cd4d507dc1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -1119,9 +1119,12 @@ fail: GF_FREE(brick_name); rsp.op_ret = ret; - if (rsp.op_ret < 0) + if (rsp.op_ret < 0) { gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_MOUNT_REQ_FAIL, "Failed to mount the volume"); + if (!op_errno) + op_errno = ENOENT; + } if (op_errno) rsp.op_errno = gf_errno_to_error(op_errno); |