Fedora Account System
Red Hat Associate
Red Hat Customer
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
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.
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.
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