libmultipath: more cautious blacklisting by missing property
authorMartin Wilck <mwilck@suse.com>
Mon, 24 Jun 2019 09:27:55 +0000 (11:27 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 3 Jul 2019 06:32:17 +0000 (08:32 +0200)
commitb7b6f86a2484498c235bfa91ceb62c795d93d0c2
tree316177ea6dc6f0afde90cfa4e18622e1b4911dd5
parentb2a5e00693f33a2bd10d75fca0d738e824ed881d
libmultipath: more cautious blacklisting by missing property

If a tool likk sg_inq or scsi_id fails to access a device during uevent
processing, the required properties for whitelisting a device may be
missing. This causes the device to be blacklisted and permanently orphaned,
which is not desired.

Rather, blacklisting by missing properties is meant to ensure that the
WWID determined from udev properties is _reliable_. Therefore, blacklist
only devices that exhibit ID_SERIAL (or more generally, the configured
uid_attribute), but do not have the required whitelist properties set. This
will avoid the above-mentioned problem, because if failed device I/O was
causing properties to be missing, ID_SERIAL will most likely also not be set.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/blacklist.c
libmultipath/blacklist.h
libmultipath/configure.c
libmultipath/discovery.c
multipath/multipath.conf.5
tests/blacklist.c