summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index a86795e224e..09acb25c3f5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1845,6 +1845,7 @@ glusterd_snapshot_create_prevalidate (dict_t *dict, char **op_errstr,
loglevel = GF_LOG_WARNING;
goto out;
}
+
if (glusterd_is_defrag_on (volinfo)) {
snprintf (err_str, sizeof (err_str),
"rebalance process is running for the "
@@ -1852,7 +1853,16 @@ glusterd_snapshot_create_prevalidate (dict_t *dict, char **op_errstr,
loglevel = GF_LOG_WARNING;
goto out;
}
- /* TODO: Also check whether geo replication is running */
+
+ if (gd_vol_is_geo_rep_active (volinfo)) {
+ snprintf (err_str, sizeof (err_str),
+ "geo-replication session is running for "
+ "the volume %s. Session needs to be "
+ "stopped before taking a snapshot.",
+ volname);
+ loglevel = GF_LOG_WARNING;
+ goto out;
+ }
if (volinfo->is_snap_volume == _gf_true) {
snprintf (err_str, sizeof (err_str),