summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-12 17:50:34 +0530
committerAnand Avati <avati@redhat.com>2012-03-18 01:09:25 -0700
commitf20d895a8ed2a3ee032bd0f85d5bfaf645575fd7 (patch)
tree51a4ff8a3ba3356f628afd371949e9c68cd977bf /xlators
parent6bf0a809c99ec33fee73e6ebebb58baa2614f977 (diff)
mgmt/glusterd: don't create the brick path in 'volume start'
create the missing brick directory only on a 'gluster volume start <VOLNAME> force' command Change-Id: Ica4fab9cefe953d73de9a30843d48f94e6ab735c Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 801610 Reviewed-on: http://review.gluster.com/2921 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 93c00983a..f0d8c70d8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -823,7 +823,13 @@ glusterd_op_stage_start_volume (dict_t *dict, char **op_errstr)
goto out;
}
- if (!uuid_compare (brickinfo->uuid, priv->uuid)) {
+ /* we should not be creating the directory if 'force' option
+ is not given. This may lead to issues where the actual data
+ disk is not mounted after a machine reboot, but because
+ 'glusterd' restarts the processes, the export directories
+ can be automatically created and brick would start */
+ if ((flags & GF_CLI_FLAG_OP_FORCE) &&
+ !uuid_compare (brickinfo->uuid, priv->uuid)) {
ret = glusterd_brick_create_path (brickinfo->hostname,
brickinfo->path,
volinfo->volume_id,