diff options
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 15 |
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 8419cfb25..5b9fc2efb 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); |