summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-05-07 13:31:24 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-19 03:27:20 -0700
commitef3cd63cc95c26fdf7f7a2d8046b4686b02cb836 (patch)
treeceb3d090008b632f01f82da3076e439e9f5a24c7 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c
parent0cdb1d147afd644153855f6557bf7e809e5444f0 (diff)
glusterd: Fixed glusterd_brick_create_path algo.
- check if any prefix of the brick path has "trusted.gfid" or "trusted.glusterfs.volume-id" set. - set trusted.glusterfs.volume-id on the bricks as soon as its induction into the volume is settled. Earlier, the setting of "volume-id" used to happen during the first run of the brick process, leaving of window for bricks part of one volume to be (ab)used by another volume inadvertently. - removed creation of brick directory (if missing), during start volume force. This is to avoid directory creation as part 'force'ful starting of volume and leave the responsibility with the user, who understands the 'availability' of the export directory (brick) better. Change-Id: I4237ec4ea7a4e38a7501027e7de7112edd67de8c BUG: 812214 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3280 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3313
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 4ee9582fd4f..9ee28733a4f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -718,7 +718,7 @@ glusterd_op_stage_create_volume (dict_t *dict, char **op_errstr)
ret = glusterd_brick_create_path (brick_info->hostname,
brick_info->path,
volume_uuid,
- 0777, op_errstr);
+ op_errstr);
if (ret)
goto out;
brick_list = tmpptr;
@@ -843,21 +843,6 @@ glusterd_op_stage_start_volume (dict_t *dict, char **op_errstr)
goto out;
}
- /* 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,
- 0777, op_errstr);
- if (ret)
- goto out;
- }
-
if (!(flags & GF_CLI_FLAG_OP_FORCE)) {
if (glusterd_is_volume_started (volinfo)) {
snprintf (msg, sizeof (msg), "Volume %s already"