Bug 1261808 - gdeploy: need a check on bricks used for add-brick operation
Summary: gdeploy: need a check on bricks used for add-brick operation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: gdeploy
Version: rhgs-3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.1.3
Assignee: Sachidananda Urs
QA Contact: Anush Shetty
URL:
Whiteboard:
Depends On:
Blocks: 1299184
TreeView+ depends on / blocked
 
Reported: 2015-09-10 08:26 UTC by Anush Shetty
Modified: 2016-06-23 05:28 UTC (History)
5 users (show)

Fixed In Version: gdeploy-2.0-2
Doc Type: Bug Fix
Doc Text:
Previously, if the sub-directory is not mentioned during volume creation, the volume would be created on the root of the mount point. Due to this, user might end up creating files on the root of the mount-point, which is not recommended. With this release, gdeploy reports an error and does not create the volume unless `force' is explicitly mentioned.
Clone Of:
Environment:
Last Closed: 2016-06-23 05:28:26 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:1250 0 normal SHIPPED_LIVE gdeploy update for Red Hat Gluster Storage 3.1 update 3 2016-06-23 09:11:59 UTC

Description Anush Shetty 2015-09-10 08:26:03 UTC
Description of problem: Currently, there is no check on bricks used for add-brick operation which makes it possible for a directory under root partition to be added as a brick to the volume.

This is because bricks for add-brick operation are mentioned under [volumes] section.

Version-Release number of selected component (if applicable): gdeploy-1.0-10.el6rhs.noarch


How reproducible: Always

Steps to Reproduce:
1. Create a config file for setting up bricks:

gdeploy config: gluster.conf

[hosts]
rhshdp03.lab.eng.blr.redhat.com
rhshdp04.lab.eng.blr.redhat.com
rhshdp05.lab.eng.blr.redhat.com
rhshdp06.lab.eng.blr.redhat.com

[devices]
/dev/vdb

[mountpoints]
/gluster1/brick1/

[brick_dirs]
/gluster1/brick1/s1

[peer]
manage=probe

[volume]
action=add-brick
volname=gluster_vol1
replica=yes
replica_count=2
bricks=rhshdp05.lab.eng.blr.redhat.com:/mnt/s32,rhshdp06.lab.eng.blr.redhat.com:/mnt/s32

2. Run gdeploy: gdeploy -c gluster.conf

Actual results:

add-brick operation succeeds

Comment 2 Nandaja Varma 2015-09-10 08:37:31 UTC
The reason why it was being a success was we were enforcing force option for add-brick in every case. This behavior has been changed and if the user did not say explicitly the operation will not be forced.

So, in this  case, without force if the glusterd throws an error while add-brick, similar behavior will be maintained in gdeploy.

Comment 4 Anush Shetty 2016-04-04 10:02:16 UTC
Errors out with gdeploy-2.0-2.el7rhgs.noarch

TASK: [Add bricks to an existing volume] ************************************** 
failed: [10.70.37.163] => {"failed": true, "rc": 1}
msg: volume add-brick: failed: Staging failed on 10.70.37.147. Error: The brick 10.70.37.147:/mnt/s1 is being created in the root partition. It is recommended that you don't use the system's root partition for storage backend. Or use 'force' at the end of the command if you want to override this behavior.


FATAL: all hosts have already failed -- aborting


--

Marking this as VERIFIED.

Comment 6 errata-xmlrpc 2016-06-23 05:28:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2016:1250


Note You need to log in before you can comment on or make changes to this bug.