summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-01-27 07:57:27 +0000
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-01-27 03:22:51 -0800
commite39d80f9921c6fbfe084bdb66f95532794fc6aca (patch)
tree16730fa2165c751e66d419255d4def07235f4a22
parentbf227251eadcc35a102fc9db0c39e36b7336954d (diff)
glusterd/snapshot: Ignore failure to copy geo-rep files.
In case a new node is added to the peer, after a snapshot was taken, the geo-rep files are not synced to that node. This leads to the failure of snapshot restore. Hence, ignoring the missing geo-rep files in the new node, and proceeding with snapshot restore. Once the restore is successful, the missing geo-rep files can be generated with "gluster volume geo-rep <master-vol> <slave-vol> create push-pem force" Change-Id: I1c364f8aefdd6c99b0b861b6d0cb33709ec39da2 BUG: 1181418 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/9489 Reviewed-by: Sachin Pandit <spandit@redhat.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 322da605214..839e40e9dcc 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -8217,12 +8217,19 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict,
goto out;
}
+ /* In case a new node is added to the peer, after a snapshot was
+ * taken, the geo-rep files are not synced to that node. This
+ * leads to the failure of snapshot restore. Hence, ignoring the
+ * missing geo-rep files in the new node, and proceeding with
+ * snapshot restore. Once the restore is successful, the missing
+ * geo-rep files can be generated with "gluster volume geo-rep
+ * <master-vol> <slave-vol> create push-pem force"
+ */
ret = glusterd_restore_geo_rep_files (snap_vol);
if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "Failed to restore "
+ gf_log (this->name, GF_LOG_WARNING, "Failed to restore "
"geo-rep files for snap %s",
snap_vol->snapshot->snapname);
- goto out;
}
ret = glusterd_copy_quota_files (snap_vol, orig_vol);