From c50766a76783e15b25a9bc57a4ece190df4e2a5b Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 27 May 2014 17:46:08 +0530 Subject: mgmt/glusterd: return failure when server quorum is not met Change-Id: I0a7df141d01cf70da5aac9658b2a5a19f660dd3b BUG: 1101561 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/7894 Reviewed-by: Sachin Pandit Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index ced41fb3a55..bd9f7ba39af 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -12759,7 +12759,7 @@ int32_t glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume, char **op_errstr) { - int32_t ret = 0; + int32_t ret = -1; xlator_t *this = NULL; int32_t snap_command = 0; char err_str[PATH_MAX] = {0, }; @@ -12793,6 +12793,7 @@ glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume, case GF_SNAP_OPTION_TYPE_DELETE: case GF_SNAP_OPTION_TYPE_RESTORE: if (!does_gd_meet_server_quorum (this)) { + ret = -1; snprintf (err_str, sizeof (err_str), "glusterds are not in quorum"); gf_log (this->name, GF_LOG_WARNING, "%s", -- cgit