Bug 1001040 - "ERROR: could not find mountpoint for brick directory" while setting tuned profile to brick directory with hyphen.
Summary: "ERROR: could not find mountpoint for brick directory" while setting tuned pr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: storage-server-tools
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ---
: ---
Assignee: Bala.FA
QA Contact: Gowrishankar Rajaiyan
URL:
Whiteboard:
Depends On:
Blocks: 1001887
TreeView+ depends on / blocked
 
Reported: 2013-08-26 11:36 UTC by Gowrishankar Rajaiyan
Modified: 2015-11-23 02:57 UTC (History)
10 users (show)

Fixed In Version: redhat-storage-server-2.1.0.2-1.el6rhs
Doc Type: Bug Fix
Doc Text:
Previously, a hyphen in the volume name would cause the tuned profile to fail. Tuned profiles tried to find bricks in a volume using the directory tree under /var/lib/glusterd/vols. The fix probes the bricks correctly using the volume configuration files, making the tuned profiles to work as expected even if a volume name has a hyphen.
Clone Of:
: 1001887 (view as bug list)
Environment:
Last Closed: 2013-12-09 16:45:18 UTC
Embargoed:


Attachments (Terms of Use)

Description Gowrishankar Rajaiyan 2013-08-26 11:36:48 UTC
Description of problem: Error detected while setting tuned profile to a volume name which has hyphen in it.


Version-Release number of selected component (if applicable):
RHS-2.1-20130820.n.0

How reproducible: Always


Steps to Reproduce:
1. Install RHS 2.1 
2. Create volume with hyphen in it. "glance-volume, in this case"
3. Set tuned profile.

Actual results:
[root@localhost ~]# tuned-adm profile rhs-virtualization
Reverting to saved sysctl settings:                        [  OK  ]
Calling '/etc/ktune.d/tunedadm.sh stop': setting readahead to 128 on brick devices: ERROR: could not find mountpoint for brick directory /rhs/bricks/cinder
ERROR: could not find mountpoint for brick directory /rhs/bricks/glance

                                                           [  OK  ]
Reverting to cfq elevator: dm-0 dm-1 dm-2 dm-3             [  OK  ]
Stopping tuned:                                            [  OK  ]
Switching to profile 'rhs-virtualization'
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf:                                [  OK  ]
Calling '/etc/ktune.d/tunedadm.sh start': setting readahead to 4096 on brick devices: ERROR: could not find mountpoint for brick directory /rhs/bricks/cinder
ERROR: could not find mountpoint for brick directory /rhs/bricks/glance

                                                           [  OK  ]
Applying sysctl settings from /etc/sysctl.conf
Applying deadline elevator: dm-0 dm-1 dm-2 dm-3            [  OK  ]
Starting tuned:                                            [  OK  ]
[root@localhost ~]# 


Expected results: Tuned profile should be set correctly. ERROR's should not be detected.


Additional info:

This happens because of "ls | grep $ipaddr | awk -F: '{ print $2 }' | sed 's/\-/\//g'" which replaces "-" to "/"

Comment 1 Gowrishankar Rajaiyan 2013-08-26 11:45:16 UTC
(In reply to Gowrishankar Rajaiyan from comment #0)
> Description of problem: Error detected while setting tuned profile to a
> volume name which has hyphen in it.
> 

Correction: Error detected while setting tuned profile if the brick directory has "hyphen" in it. glance-volume and cinder-volume in this case.

Comment 2 Ben England 2013-08-27 17:28:53 UTC
Is there any way to work around the problem by not using a hyphen in the brick directory name?  How about using an underscore or a dot?

To understand this problem, see the set_brick_ra() subroutine within /etc/tune-profiles/rhs-virtualization/ktune.sh:  

ls | grep `hostname -s` | awk -F: '{ print $2 }' | sed 's/\-/\//g' >> $bricklist

The entries in this directory /var/lib/glusterd/vols/your-volume/bricks/ look like this:

gprfs045-10ge:-mnt-brick0-brick  
gprfs047-10ge:-mnt-brick0-brick
gprfs046-10ge:-mnt-brick0-brick  
gprfs048-10ge:-mnt-brick0-brick

So the grep command selects the local host's bricks, the awk command filters out the hostname.  The directory path for the brick is encoded by Gluster replacing "/" with "-".  This is a poor choice because a filename can have a "-" in it, so this much is a Gluster bug.  The script is trying to convert back to a path specification for the brick directory with the sed command, but this doesn't work because the brick directory's filename has a "-" character in it.

My only other option AFAIK is to parse the /var/lib/glusterd/vols/$volume/${volume}-fuse.vol file.  If you need this fixed now and the workaround won't do, you have to let me know ASAP.

Comment 3 Gowrishankar Rajaiyan 2013-08-27 20:14:33 UTC
I don't see a work around to the problem here. Using an underscore or a dot or no special characters is a way to evade the issue and would have to be documented as a known issue or am I missing the work around ?

Comment 4 Bala.FA 2013-08-28 00:40:14 UTC
This fix is available at https://code.engineering.redhat.com/gerrit/12059.

Ben, could you help on reviewing this patch?

Comment 6 Sachidananda Urs 2013-09-05 09:16:39 UTC
Since this is not a blocker, we will move this to future?

Comment 7 Ben England 2013-09-09 17:00:54 UTC
Can we at least get it into RHS 2.1U1 and RHS 2.0U6?

Comment 8 Gowrishankar Rajaiyan 2013-10-03 09:52:52 UTC
Reverting fixed in version.

Comment 9 Gowrishankar Rajaiyan 2013-10-03 11:59:18 UTC
Volume Name: shanks-verify_bug1001040
Type: Replicate
Volume ID: 65f45568-88ad-4213-87d8-1942f64b8c5a
Status: Created
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 10.70.34.68:/rhs1/shanks-verify_bug.1001040
Brick2: 10.70.34.56:/rhs1/shanks-verify_bug.1001040


[root@ninja ~]# tuned-adm profile rhs-virtualization
Stopping tuned:                                            [  OK  ]
Switching to profile 'rhs-virtualization'
Applying ktune sysctl settings:
/etc/ktune.d/tunedadm.conf:                                [  OK  ]
Calling '/etc/ktune.d/tunedadm.sh start': setting readahead to 4096 on brick devices:  dm-2 dm-3 dm-3
                                                           [  OK  ]
Applying sysctl settings from /etc/sysctl.conf
Applying deadline elevator: dm-0 dm-1 dm-2 dm-3 sda        [  OK  ]
Starting tuned:                                            [  OK  ]
[root@ninja ~]# 


Verified redhat-storage-server-2.1.0.3-1.el6rhs.noarch

Comment 10 Pavithra 2013-10-29 10:38:55 UTC
hi Bala,

Please review the edited doc text (for errata) and sign off on its technical accuracy.

Thank you.

Comment 11 Bala.FA 2013-10-29 10:49:15 UTC
Looks good to me.


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