summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-08-20 14:40:29 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-08-23 23:51:05 -0700
commit38f0caa2179f2594b9e49f7b06d246693db92c44 (patch)
treed1e38b7df19e1ec913728c7fb0e71c5207e95512 /xlators/mgmt/glusterd
parente121b7462a6f1a732b3c081f9b8b1e3552ecbbdd (diff)
snapshot: Log deletion of snapshot, during auto-delete
Backport of http://review.gluster.org/#/c/11963/ When auto-delete is enabled, and soft-limit is reached, on creation of a snapshot, the oldest snapshot for that volume is deleted. Displaying a warning log before deleting the oldest snapshot. Change-Id: I75f0366935966a223b63a4ec5ac13f9fe36c0e82 BUG: 1255311 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11964 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-messages.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-messages.h b/xlators/mgmt/glusterd/src/glusterd-messages.h
index 8f80e999809..addd3e215a9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-messages.h
+++ b/xlators/mgmt/glusterd/src/glusterd-messages.h
@@ -776,7 +776,7 @@
* @recommendedaction
*
*/
-#define GD_MSG_SNAPSHOT_OP_SUCCESS (GLUSTERD_COMP_BASE + 91)
+#define GD_MSG_OP_SUCCESS (GLUSTERD_COMP_BASE + 91)
/*!
* @messageid
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 2c8349a60aa..e9db37f8738 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -5974,7 +5974,7 @@ glusterd_snapshot_remove_commit (dict_t *dict, char **op_errstr,
goto out;
} else
gf_msg (this->name, GF_LOG_INFO, 0,
- GD_MSG_SNAPSHOT_OP_SUCCESS, "Successfully marked "
+ GD_MSG_OP_SUCCESS, "Successfully marked "
"snap %s for decommission.", snap->snapname);
if (is_origin_glusterd (dict) == _gf_true) {
@@ -7727,6 +7727,12 @@ glusterd_handle_snap_limit (dict_t *dict, dict_t *rsp_dict)
snap = tmp_volinfo->snapshot;
GF_ASSERT (snap);
+ gf_msg (this->name, GF_LOG_WARNING, 0,
+ GD_MSG_SOFT_LIMIT_REACHED, "Soft-limit "
+ "(value = %"PRIu64") of volume %s is reached. "
+ "Deleting snapshot %s.", limit, volinfo->volname,
+ snap->snapname);
+
LOCK (&snap->lock);
{
snap->snap_status = GD_SNAP_STATUS_DECOMMISSION;