summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2014-01-09 00:58:06 +0000
committerAvra Sengupta <asengupt@redhat.com>2014-01-15 00:07:18 +0000
commit476c6284eac93239e3aaf986a6bcdd3628b95fb0 (patch)
tree5264f8c7492f142412009d32f16f085d5628a68a
parent33c45ff71cb43eec7cdcee054a6a55b7c3aaa8fb (diff)
glusterd: Keeping snapshot delete error messages consistent with that of vol delete.
Change-Id: I5056c0e46015278bd8d0c39307e4671fd4259961 Signed-off-by: Avra Sengupta <asengupt@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index acc8bef..1d6da16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -3417,7 +3417,7 @@ glusterd_handle_snapshot_remove (rpcsvc_request_t *req, glusterd_op_t op,
cg = glusterd_find_snap_cg_by_name (conf, cgname);
if (NULL == cg) {
- snprintf (err_str, len, "CG %s not found", cgname);
+ snprintf (err_str, len, "CG %s does not exist", cgname);
gf_log (this->name, GF_LOG_WARNING, "%s", err_str);
ret = -1;
goto out;
@@ -3504,7 +3504,7 @@ glusterd_snapshot_remove_prevalidate (dict_t *dict, char **op_errstr,
cg = glusterd_find_snap_cg_by_name (conf, name);
if (!cg) {
snprintf (err_str, sizeof (err_str), "consistency group"
- "%s is not found", name);
+ "%s does not exist", name);
gf_log (this->name, GF_LOG_ERROR, "%s", err_str);
*op_errstr = gf_strdup (err_str);
goto out;
@@ -3545,9 +3545,10 @@ glusterd_snapshot_remove_prevalidate (dict_t *dict, char **op_errstr,
}
ret = glusterd_volinfo_find (volname, &volinfo);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR,
- "failed to get the volinfo for "
- "the volume %s", volname);
+ snprintf (err_str, sizeof (err_str), "Volume %s does "
+ "not exist", volname);
+ gf_log (this->name, GF_LOG_ERROR, "%s", err_str);
+ *op_errstr = gf_strdup (err_str);
goto out;
}
ret = dict_get_str (dict, "snapname", &name);
@@ -3559,8 +3560,8 @@ glusterd_snapshot_remove_prevalidate (dict_t *dict, char **op_errstr,
snap = glusterd_find_snap_by_name (volinfo, name);
if (!snap) {
ret = -1;
- snprintf (err_str, sizeof (err_str), "snap %s is not "
- "found", name);
+ snprintf (err_str, sizeof (err_str), "snap %s does "
+ "not exist", name);
gf_log (this->name, GF_LOG_ERROR, "%s, (volume: %s)",
err_str, volinfo->volname);
*op_errstr = gf_strdup (err_str);