multipath-tools fixes for GitHub reported issues
cover multipath-tools fixes for GitHub reported issues
From: Martin Wilck <[email protected]>
Two patches that originate from issues reported on GitHub. I couldn't figure out the email addresses of the reporters.
Martin Wilck (2):
libmpathpersist: use conf->timeout for updating persistent
reservations
libmultipath: pathinfo: don't fail for devices lacking INQUIRY
properties
libmpathpersist/mpath_updatepr.c | 11 ++++++++++- libmultipath/discovery.c | 22 +++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-)
Signature · 6 lines
2.39.0 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
PATCH 1/2 libmpathpersist: use conf->timeout for updating persistent reservations
From: Martin Wilck <[email protected]>
On systems with many LUNs, multipathd may fail to respond within the default timeout to a "setprkey" command because the vecs lock is held by the path checker. Honor the globally configured uxsock timeout in libmpathpersist.
--- libmpathpersist/mpath_updatepr.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
libmpathpersist/mpath_updatepr.c +10 -1
@@ -14,6 +14,9 @@#include <mpath_persist.h> #include "debug.h" #include "mpath_cmd.h" +#include "vector.h" +#include "globals.h" +#include "config.h" #include "uxsock.h" #include "mpathpr.h"
@@ -24,6 +27,12 @@ static int do_update_pr(char *alias, char *cmd, char *key)char str[256 ];char *reply;int ret =0 ; +int timeout; +struct config *conf; + + conf =get_multipath_config (); + timeout = conf->uxsock_timeout; +put_multipath_config (conf); fd =mpath_connect ();if (fd ==-1 ) {
@@ -41,7 +50,7 @@ static int do_update_pr(char *alias, char *cmd, char *key)mpath_disconnect (fd);return -1 ; } - ret =recv_packet (fd, &reply,DEFAULT_REPLY_TIMEOUT ); + ret =recv_packet (fd, &reply, timeout);if (ret <0 ) {condlog (2 ,"%s: message=%s recv error=%d" , alias, str, errno); ret =-1 ;
Signature · 6 lines
2.39.0 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
PATCH 2/2 libmultipath: pathinfo: don't fail for devices lacking INQUIRY properties
In reply to [email protected]From: Martin Wilck <[email protected]>
Some SAS devices (e.g. Seagate factory recertified 'white label' drives) may come with the Vendor field blank. This causes Multipath to fail to complete the discovery of those devices.
Such devices violate the SCSI Spec. From the SPC-6, §6.7.2:
"The T10 VENDOR IDENTIFICATION field contains eight bytes of left-aligned ASCII data (see 4.3.1) identifying the manufacturer of the logical unit. The T10 vendor identification shall be one assigned by INCITS.".
But as we don't identify WWIDs by vendor and product, we don't need to discard these devices right away. We can go ahead fingers crossed, and hope that the the other VPD pages for the device are correct.
We obviously can't look up reasonable device properties for such devices in our hwtable. It would be up to the user to deal with that.
Reported by: Allyn Malventano (github.com/opensvc/multipath-tools/issues/56)
--- libmultipath/discovery.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
libmultipath/discovery.c +13 -9
@@ -1472,6 +1472,7 @@ scsi_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable) {struct udev_device *parent;const char *attr_path =NULL ; +static const char unknown[] ="UNKNOWN" ; parent = pp->udev;while (parent) {
@@ -1492,19 +1493,22 @@ scsi_sysfs_pathinfo (struct path *pp, const struct _vector *hwtable)if (!attr_path || pp->sg_id.host_no ==-1 )return PATHINFO_FAILED ; -if (sysfs_get_vendor (parent, pp->vendor_id,SCSI_VENDOR_SIZE ) <=0 ) -return PATHINFO_FAILED ;; - +if (sysfs_get_vendor (parent, pp->vendor_id,SCSI_VENDOR_SIZE ) <=0 ) { +condlog (1 ,"%s: broken device without vendor ID" , pp->dev); +strlcpy (pp->vendor_id, unknown,SCSI_VENDOR_SIZE ); + }condlog (3 ,"%s: vendor = %s" , pp->dev, pp->vendor_id); -if (sysfs_get_model (parent, pp->product_id,PATH_PRODUCT_SIZE ) <=0 ) -return PATHINFO_FAILED ;; - +if (sysfs_get_model (parent, pp->product_id,PATH_PRODUCT_SIZE ) <=0 ) { +condlog (1 ,"%s: broken device without product ID" , pp->dev); +strlcpy (pp->product_id, unknown,PATH_PRODUCT_SIZE ); + }condlog (3 ,"%s: product = %s" , pp->dev, pp->product_id); -if (sysfs_get_rev (parent, pp->rev,PATH_REV_SIZE ) <0 ) -return PATHINFO_FAILED ;; - +if (sysfs_get_rev (parent, pp->rev,PATH_REV_SIZE ) <0 ) { +condlog (2 ,"%s: broken device without revision" , pp->dev); +strlcpy (pp->rev, unknown,PATH_REV_SIZE ); + }condlog (3 ,"%s: rev = %s" , pp->dev, pp->rev);/*
Signature · 6 lines
2.39.0 -- dm-devel mailing list [email protected] https://listman.redhat.com/mailman/listinfo/dm-devel
Quoted 4 lines · On Fri, Jan 13, 2023 at 10:43:08AM +0100, [email protected] wrote:
From: Martin Wilck <[email protected]>
Two patches that originate from issues reported on GitHub. I couldn't figure out the email addresses of the reporters.
For the set,
Quoted 7 lines
Martin Wilck (2):
libmpathpersist: useconf->timeoutfor updating persistent
reservations
libmultipath: pathinfo: don't fail for devices lacking INQUIRY
properties
Quoted 6 lines
libmpathpersist/mpath_updatepr.c | 11 ++++++++++- libmultipath/discovery.c | 22 +++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-)Signature · 1 line
2.39.0
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel