|
|
14f8ab |
From 3d50207b346cb5d95af94aa010ebd1ec3e795554 Mon Sep 17 00:00:00 2001
|
|
|
14f8ab |
From: srijan-sivakumar <ssivakum@redhat.com>
|
|
|
14f8ab |
Date: Wed, 4 Nov 2020 11:44:51 +0530
|
|
|
14f8ab |
Subject: [PATCH 477/478] glusterd/snapshot: Snapshot prevalidation failure not
|
|
|
14f8ab |
failing.
|
|
|
14f8ab |
|
|
|
14f8ab |
The value of `ret` is to be set to `-1` to indicate failure
|
|
|
14f8ab |
or else the prevalidation which is supposed to be a failure
|
|
|
14f8ab |
as the snapshot isn't even activated for cloning will move
|
|
|
14f8ab |
to next stage.
|
|
|
14f8ab |
|
|
|
14f8ab |
Label: DOWNSTREAM ONLY
|
|
|
14f8ab |
BUG: 1837926
|
|
|
14f8ab |
|
|
|
14f8ab |
Change-Id: I95122c3a261332630efa00033a1892a8f95fc00b
|
|
|
14f8ab |
Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
|
|
|
14f8ab |
Reviewed-on: https://code.engineering.redhat.com/gerrit/216920
|
|
|
14f8ab |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Shwetha Acharya <sacharya@redhat.com>
|
|
|
14f8ab |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
14f8ab |
---
|
|
|
14f8ab |
xlators/mgmt/glusterd/src/glusterd-snapshot.c | 5 +++--
|
|
|
14f8ab |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
14f8ab |
|
|
|
14f8ab |
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
14f8ab |
index 5b8ae97..ee3cea0 100644
|
|
|
14f8ab |
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
14f8ab |
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
|
|
|
14f8ab |
@@ -2298,8 +2298,8 @@ glusterd_snapshot_clone_prevalidate(dict_t *dict, char **op_errstr,
|
|
|
14f8ab |
goto out;
|
|
|
14f8ab |
}
|
|
|
14f8ab |
|
|
|
14f8ab |
-
|
|
|
14f8ab |
if (!glusterd_is_volume_started(snap_vol)) {
|
|
|
14f8ab |
+ ret = -1;
|
|
|
14f8ab |
snprintf(err_str, sizeof(err_str),
|
|
|
14f8ab |
"Snapshot %s is "
|
|
|
14f8ab |
"not activated",
|
|
|
14f8ab |
@@ -9361,7 +9361,8 @@ glusterd_handle_snapshot_fn(rpcsvc_request_t *req)
|
|
|
14f8ab |
"for a snapshot");
|
|
|
14f8ab |
op_errno = EG_OPNOTSUP;
|
|
|
14f8ab |
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION,
|
|
|
14f8ab |
- "%s (%d < %d)", err_str, conf->op_version, GD_OP_VERSION_RHS_3_0);
|
|
|
14f8ab |
+ "%s (%d < %d)", err_str, conf->op_version,
|
|
|
14f8ab |
+ GD_OP_VERSION_RHS_3_0);
|
|
|
14f8ab |
ret = -1;
|
|
|
14f8ab |
goto out;
|
|
|
14f8ab |
}
|
|
|
14f8ab |
--
|
|
|
14f8ab |
1.8.3.1
|
|
|
14f8ab |
|