diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-02-19 12:11:57 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-03-11 14:07:19 -0700 |
commit | e125e2ae61c31da798ea9a7342ea9292f47c1d6b (patch) | |
tree | 7095ef234d76ce5c7152ca9d847afc3e7a18b610 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | bc4350423a33d21464b507b4e229eb5244e0cb6e (diff) |
glusterd: Mark vol as deleted by renaming voldir before cleaning up the store
PROBLEM:
During 'volume delete', when glusterd fails to erase all information
about a volume from the backend store (for instance because rmdir()
failed on non-empty directories), not only does volume delete fail on
that node, but also subsequent attempts to restart glusterd fail
because the volume store is left in an inconsistent state.
FIX:
Rename the volume directory path to a new location
<working-dir>/trash/<volume-id>.deleted, and then go on to clean up its
contents. The volume is considered deleted once rename() succeeds,
irrespective of whether the cleanup succeeds or not.
Change-Id: Iaf18e1684f0b101808bd5e1cd53a5d55790541a8
BUG: 889630
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4639
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index c9e8d42d341..34593202b07 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -338,6 +338,7 @@ enum glusterd_vol_comp_status_ { #define GLUSTERD_VOLUME_RBSTATE_FILE "rbstate" #define GLUSTERD_BRICK_INFO_DIR "bricks" #define GLUSTERD_CKSUM_FILE "cksum" +#define GLUSTERD_TRASH "trash" #define GLUSTERD_NODE_STATE_FILE "node_state.info" /* definitions related to replace brick */ |