summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 926a4386bb5..48ad1a8dfde 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -635,6 +635,15 @@ glusterd_peer_detach_cleanup (glusterd_conf_t *priv)
gf_msg (THIS->name, GF_LOG_INFO, 0,
GD_MSG_STALE_VOL_DELETE_INFO,
"Deleting stale volume %s", volinfo->volname);
+
+ ret = glusterd_cleanup_snaps_for_volume (volinfo);
+ if (ret) {
+ gf_msg (THIS->name, GF_LOG_ERROR, 0,
+ GD_MSG_VOL_DELETE_FAIL,
+ "Error deleting snapshots for volume %s",
+ volinfo->volname);
+ }
+
ret = glusterd_delete_volume (volinfo);
if (ret) {
gf_msg (THIS->name, GF_LOG_ERROR, 0,