Bug 1001887 - "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 NEXTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: storage-server-tools
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Bala.FA
QA Contact: Sudhir D
URL:
Whiteboard:
Depends On: 1001040
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-28 03:45 UTC by Bala.FA
Modified: 2015-11-23 02:57 UTC (History)
9 users (show)

Fixed In Version: appliance-base-2.0.6.1-1.el6rhs
Doc Type: Bug Fix
Doc Text:
Clone Of: 1001040
Environment:
Last Closed: 2013-12-20 07:20:14 UTC
Embargoed:


Attachments (Terms of Use)

Description Bala.FA 2013-08-28 03:45:27 UTC
+++ This bug was initially created as a clone of Bug #1001040 +++

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 "/"

--- Additional comment from Gowrishankar Rajaiyan on 2013-08-26 07:45:16 EDT ---

(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.

--- Additional comment from Ben England on 2013-08-27 13:28:53 EDT ---

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.

--- Additional comment from Gowrishankar Rajaiyan on 2013-08-27 16:14:33 EDT ---

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 ?

--- Additional comment from Bala.FA on 2013-08-27 20:40:14 EDT ---


This fix is available at https://code.engineering.redhat.com/gerrit/12059.

Ben, could you help on reviewing this patch?

Comment 2 Bala.FA 2013-08-28 04:06:51 UTC
Patch is at https://code.engineering.redhat.com/gerrit/#/c/12070/

Comment 5 Ben England 2013-09-09 19:21:47 UTC
Can we please get tuned profiles from Big Bend into RHS 2.0 U6?

Comment 6 Bala.FA 2013-12-20 07:20:14 UTC
As this bug is clone of Bug#1001040 addressed in RHS 2.1 and it wasn't addressed/required in RHS 2.0 Update 6.  So closing it now.


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