File qdiskd_info_syslog_msg_when_lavel_overriders_device.patch of Package cluster

commit 0a4a433df0274085d6cb530c529740b77fbb93f0
Author: Jeremy Miller <csf1dsh@ups.com>
Date:   Tue Feb 1 11:52:54 2011 -0500

    qdisk: Informational syslog message indicating label overrides device
    
    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 Red Hat 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.
    
    Resolves: rhbz#635413
    
    Signed-off-by: Lon Hohberger <lhh@redhat.com>
    Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>

diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 617a705..ebdb018 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1746,6 +1746,11 @@ get_static_config_data(qd_ctx *ctx, int ccsfd)
 	snprintf(query, sizeof(query), "/cluster/quorumd/@label");
 	if (ccs_get(ccsfd, query, &val) == 0) {
 		ctx->qc_label = val;
+		/* courtesy info message */
+		if (ctx->qc_device)
+			logt_print(LOG_INFO, "Quorum Label (%s) will be used to "
+				   "locate quorum partition, overriding Quorum Device\n",
+				   ctx->qc_label);
 	}
 
 	if (!ctx->qc_device && !ctx->qc_label) {