| Summary: | "ERROR: could not find mountpoint for brick directory" while setting tuned profile to brick directory with hyphen. | |||
|---|---|---|---|---|
| Product: | Red Hat Gluster Storage | Reporter: | Gowrishankar Rajaiyan <grajaiya> | |
| Component: | storage-server-tools | Assignee: | Bala.FA <barumuga> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Gowrishankar Rajaiyan <grajaiya> | |
| Severity: | urgent | Docs Contact: | ||
| Priority: | high | |||
| Version: | 2.1 | CC: | barumuga, bengland, dpati, grajaiya, perfbz, psriniva, rcyriac, rhs-bugs, surs, tkatarki | |
| Target Milestone: | --- | Keywords: | ZStream | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| 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.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1001887 (view as bug list) | Environment: | ||
| Last Closed: | 2013-12-09 16:45:18 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: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1001887 | |||
(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. 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.
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 ? This fix is available at https://code.engineering.redhat.com/gerrit/12059. Ben, could you help on reviewing this patch? Since this is not a blocker, we will move this to future? Can we at least get it into RHS 2.1U1 and RHS 2.0U6? Reverting fixed in version. 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
hi Bala, Please review the edited doc text (for errata) and sign off on its technical accuracy. Thank you. Looks good to me. |
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 "/"