Bug 635413

Summary: quorum label overriding quorum device not made clear to user
Product: Red Hat Enterprise Linux 6 Reporter: Jeremy Miller <csf1dsh>
Component: clusterAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: ccaulfie, cluster-maint, edamato, fdinitto, jkortus, lhh, rpeterso, teigland
Target Milestone: rc   
Target Release: 6.1   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cluster-3.0.12-31.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 12:54:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Informational syslog message indicating label overrides device none

Description Jeremy Miller 2010-09-19 15:45:36 UTC
Created attachment 448295 [details]
Informational syslog message indicating label overrides device

Description of problem:
When user specifies both quorum label and quorum device (ccs allows this), the user isn't notified that the label will override the device when searching through disks for the quorum partition.  This can mislead the user into thinking that qdiskd will in fact use the quorum device they specified.

This can have serious consequences when the user intends qdiskd to use a specified a multipath device such as "/dev/mapper/qdisk", but in actuality qdiskd will just use the first device it finds with matching user specified label (for example "/dev/dm-17").  According to RedHat documentation, when using multipath, one should always use /dev/mapper/xxx devices to ensure proper path failover, rather than /dev/dm-xx or /dev/mpath/xxx devices.

Version-Release number of selected component (if applicable):
cman-2.0.115-34.el5.x86_64 from RHEL 5.5

How reproducible:
Specify both device and label in the quourmd stanza of the cluster configuration file.  ex:
<quorumd interval="2" min_score="1" tko="15" votes="1" device="/dev/mapper/qdisk" label="rhcsqdisk" status_file="/var/log/qdisk.status" log_level="7" log_facility="local5">
</quorumd>

Steps to Reproduce:
1.  when using multipath for quorum disk, define both label="xxx" and device="/dev/mapper/xxx" in cluster.conf
2.  restart qdiskd service
3.  lsof | grep qdiskd  will show qdiskd using a /dev/dm-xx device instead of the /dev/mapper/xxx device as user intended.
  
Actual results:
/dev/dm-xxx

Expected results:
/dev/mapper/xxx

Additional info:
Attached patch will syslog an informtional message indicating that the Qurom Label will override the Quorum Device when searching for the quorum partition.  This will alert the administrator to the unintended result and allow the administrator to adjust the cluster configuration removing the label and only defining device, especially when the intent is to ensure qdiskd has proper path failover such as a multipathed /dev/mapper/xxx device.

Comment 1 Lon Hohberger 2011-01-25 19:50:25 UTC
I agree it'd be useful, but I wonder exactly how much.

This is documented in section 3.1 of qdisk(5) and has been since the label feature was introduced:

         device="/dev/sda1"
            This is the device the quorum daemon will use.   This  device
            must be the same on all nodes.

         label="mylabel"
            This  overrides  the  device field if present.  If specified,
            the quorum daemon will read /proc/partitions  and  check  for
            qdisk  signatures  on every block device found, comparing the
            label against the specified label.  This is useful in config-
            urations  where  the  block device name differs on a per-node
            basis.

... and it is also also in the RHEL5 documentation, section 3.4, table 3.1 :

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/Cluster_Administration/index.html#s1-general-prop-conga-CA

... and also the log message which is printed when a label is specified:

[16173] info: Quorum Partition: /dev/disk/by-id/scsi-1IET_00010001-part2 Label: rhel5t2

I'd like to merge the patch upstream if that's okay.

Comment 2 Lon Hohberger 2011-01-26 15:02:20 UTC
Is the email address used for bugzilla appropriate for merging your patch upstream, or would you like me to use a different one?

Comment 3 RHEL Program Management 2011-01-26 16:05:10 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Comment 4 Fabio Massimo Di Nitto 2011-01-28 10:03:40 UTC
The patch looks simple and sane to me.

Comment 5 Lon Hohberger 2011-01-31 15:19:10 UTC
I agree, it's very simple.

Comment 9 errata-xmlrpc 2011-05-19 12:54:05 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0537.html