summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2014-01-15 00:52:15 -0800
committerGerrit Code Review <review@dev.gluster.org>2014-01-15 00:52:15 -0800
commite17b100f73b3204867d70f0f95a9b2de9c13b467 (patch)
tree580652ae5df870491fb9acb0ddd5ee114b999aa0
parent919645c4b344a39cd93392f58f0dbdd003109a4a (diff)
parent476c6284eac93239e3aaf986a6bcdd3628b95fb0 (diff)
Merge "glusterd: Keeping snapshot delete error messages consistent with that of vol delete." into development
-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 8419cfb..5b9fc2e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -3311,7 +3311,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;
@@ -3398,7 +3398,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;
@@ -3439,9 +3439,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);
@@ -3453,8 +3454,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);