From c6f4504c12d35359986a08da222193057946570a Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Tue, 15 Apr 2014 17:48:16 +0530 Subject: mgmt/glusterd: handle postvalidate carefully when prevalidate fails * Also changed the order of peers retrieval and snapshot retrieval upon glusterd start, so that the snapshot bricks can be properly resolved while cleaning up the snapshots. Change-Id: I120704e4412a9cadb8d90a9b7969f2b4a1196bc5 BUG: 1061685 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/7494 Reviewed-by: Kaushal M Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-store.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index ab635ff943f..0404e110cb5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -3987,11 +3987,19 @@ glusterd_restore () if (ret) goto out; - ret = glusterd_store_retrieve_snaps (this); + ret = glusterd_store_retrieve_peers (this); if (ret) goto out; - ret = glusterd_store_retrieve_peers (this); + /* While retrieving snapshots, if the snapshot status + is not GD_SNAP_STATUS_IN_USE, then the snapshot is + cleaned up. To do that, the snap volume has to be + stopped by stopping snapshot volume's bricks. And for + that the snapshot bricks should be resolved. But without + retrieving the peers, resolving bricks will fail. So + do retrieving of snapshots after retrieving peers. + */ + ret = glusterd_store_retrieve_snaps (this); if (ret) goto out; -- cgit