Bug 1008942

Summary: RHS-C: Introduce a Force option in the UI to allow creation of bricks in the root partition
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Prasanth <pprakash>
Component: rhscAssignee: Kanagaraj <kmayilsa>
Status: CLOSED ERRATA QA Contact: Shruti Sampat <ssampat>
Severity: high Docs Contact:
Priority: high    
Version: 2.1CC: barumuga, dpati, dtsang, kmayilsa, knarra, mmahoney, pprakash, rhs-bugs, sankarshan, sharne, ssampat
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 2.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: CB12 Doc Type: Enhancement
Doc Text:
Enhancements have been made to add 'Allow bricks in root partition and re-use existing bricks by clearing xattrs' checkbox in the 'Add Bricks' window to enable the user to create brick directory in root partition.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-25 07:38:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1028282    
Bug Blocks:    

Description Prasanth 2013-09-17 11:36:19 UTC
Description of problem:

"Create Volume" should show the same warning that gluster CLI gives when a brick is being created in a root partition and also provide a check box (force) to override this behaviour.

Version-Release number of selected component (if applicable):

[root@vm03 rhs]# rpm -qa |grep vdsm
vdsm-python-4.10.2-23.0.1.el6rhs.x86_64
vdsm-cli-4.10.2-23.0.1.el6rhs.noarch
vdsm-xmlrpc-4.10.2-23.0.1.el6rhs.noarch
vdsm-4.10.2-23.0.1.el6rhs.x86_64
vdsm-reg-4.10.2-23.0.1.el6rhs.noarch
vdsm-gluster-4.10.2-23.0.1.el6rhs.noarch

[root@vm03 rhs]# rpm -qa |grep glusterfs
glusterfs-geo-replication-3.4.0.33rhs-1.el6rhs.x86_64
samba-glusterfs-3.6.9-160.3.el6rhs.x86_64
glusterfs-libs-3.4.0.33rhs-1.el6rhs.x86_64
glusterfs-3.4.0.33rhs-1.el6rhs.x86_64
glusterfs-server-3.4.0.33rhs-1.el6rhs.x86_64
glusterfs-rdma-3.4.0.33rhs-1.el6rhs.x86_64
glusterfs-api-3.4.0.33rhs-1.el6rhs.x86_64
glusterfs-fuse-3.4.0.33rhs-1.el6rhs.x86_64


How reproducible: Always


Steps to Reproduce:
1. Click on Volumes and select "Create Volume"
2. Give a volume name and click on "Add bricks"
3. In "Brick Directory", give some brick paths in the root directory which doesn't exists. 

Actual results: 
From UI:
The volume is created successfully as the UI is running in script mode.

From CLI:
The volume creation fails with the following error/warning:

----
[root@vm03 rhs]# gluster volume create test vm02.lab.eng.blr.redhat.com:/rhs/brick10/1
volume create: test: failed: Staging failed on 10.70.36.74. Error: The brick vm02.lab.eng.blr.redhat.com:/rhs/brick10/1 is 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.
----


Expected results: 
In Force mode, gluster volume create command creates brick directory in / of storage node if the specified directory does not exist, e.g. due to a typo. This results in unsupported configuration (no xfs/LVM) and worse may fill up / of the storage node if not discovered. 

1.) So the similar warning should be given to the RHS-C users as well.
2.) Provide a check box (Force) to bypass this


Additional info: Related glusterfs bug: https://bugzilla.redhat.com/show_bug.cgi?id=864611

Comment 2 Dusmant 2013-10-25 10:55:33 UTC
This bug needs to be discussed with Gluster team ( Amar and Vijay )

Comment 3 Aravinda VK 2013-11-09 10:17:29 UTC
Glusterfs CLI is not failing when --mode=script is used at the time of volume create. Reported the bug for the same.
https://bugzilla.redhat.com/show_bug.cgi?id=1028282

Sent vdsm patch for review in upstream to add additional force option.
http://gerrit.ovirt.org/#/c/21082/

Comment 4 Bala.FA 2013-11-29 10:13:30 UTC
vdsm downstream patch is at https://code.engineering.redhat.com/gerrit/#/c/16516/

Comment 5 Shruti Sampat 2014-01-03 18:39:50 UTC
Verified as fixed in Red Hat Storage Console Version: 2.1.2-0.32.el6rhs. 

A checkbox is provided in the 'Add Bricks' dialog which allows creating bricks in the root partition and clearing xattrs to reuse bricks that were part of another volume. Checking this checkbox displays the following message - 

WARNING: This might cause the root partition to be filled up and non-operational

Without checking this checkbox, RHSC does not allow the creation of such bricks.

Marking as verified.

Comment 6 Shalaka 2014-01-07 05:22:39 UTC
Please review the edited DocText and signoff.

Comment 7 Kanagaraj 2014-01-16 06:40:41 UTC
doc_text looks good.

Comment 9 errata-xmlrpc 2014-02-25 07:38:57 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.

http://rhn.redhat.com/errata/RHEA-2014-0208.html