<div dir="ltr"><div>Hi,</div><div><br></div><div>This patchset is merged up to 75734af37267100778468319813cecc050befb1a : multipathd: push down lock in checkerloop().</div><div><br></div><div>Ben,</div><div>incidentally the find_multipath patches are in.</div><div><br></div><div>Best regards,</div><div>Christophe Varoqui</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 16, 2015 at 1:35 PM, Hannes Reinecke <span dir="ltr"><<a href="mailto:hare@suse.de" target="_blank">hare@suse.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Christophe,<br>
<br>
here are the patches which I've queued up during SLES12 development.<br>
Most of them are (more or less) obvious bugfixes, but there are some<br>
things which would warrant a deeper review:<br>
- device-mapper cookie handling: This _really_ is an arcane topic,<br>
  and I would love to have someone from the device-mapper team<br>
  to review it. I'm still facing some issues where udev emits<br>
  a warning 'conflicting device node /dev/mapper/XXX ..', so<br>
  there might be some issue with it.<br>
- Asynchronous configuration: On large systems configure() as<br>
  being called during multipathd startup might exceed the systemd<br>
  job timeout, resulting in multipathd being killed by systemd.<br>
  For that I've been implementing an udev retrigger method, which<br>
  just issues an 'add' event for all available block devices.<br>
- Related to the above: I've implemented an asynchronous 'reconfigure'<br>
  CLI call, as for the same reason systemd might kill the multipathd<br>
  during a 'restart' operation<br>
- systemd/udev integration: This is _a pain_. It took me months to<br>
  come up with a working solution. _Especially_ as apparently RH<br>
  is shipping an '11-dm-multipath.rules' udev ruleset for multipathd,<br>
  which supposedly should be handling this.<br>
  It didn't do it for me, though, so I've attached my own version here.<br>
  The udev integration I've been settling for works like this:<br>
  - 11-dm-mpath.rules checks if the device is eligible for multipathing<br>
    For that I've implemented a new option '-u' which looks at the<br>
    uevent variables _only_.<br>
  - if a device should be handled by multipathing the 'by-id' and<br>
    'by-uuid' persistent symlinks are _not_ generated, as this would<br>
    trigger systemd to start scanning/mounting/lvm activation/whatnot;<br>
    the 'by-id' and 'by-uuid' symlinks are only generated for the<br>
    multipath devices themselves.<br>
  - I've added a new multipath.rules file which should be inserted between<br>
    55-scsi-sg3_id.rules and 58-scsi_sg3_symlink.rules. This will<br>
    intercept the SCSI IDENT variables and blank them out if the (block)<br>
    device is handled by multipathing.<br>
- sysfs VPD page handling. I've planned to implement this as a direct<br>
  replacement of the original scsi_id program, but then it turned out<br>
  that our WWID handling is actually too generic for that: Both getuid<br>
  and uid_attribute can basically take _any_ value, so it's impossible<br>
  to tell if the system uses the original (scsi_id compatible) IDs or<br>
  not. And as the VPD parsing code can only generate scsi_id compatible<br>
  IDs we might run into compability issues.<br>
  So it's disabled per default. I'd really would like to clean it up,<br>
  as I suspect that about 95% of the installations are using scsi_id<br>
  compatible IDs. But for this to happen we need to clarify/restrict<br>
  the ID generation mechanism.<br>
<br>
As usual, comments and reviews are welcome.<br>
<br>
The patchset is based upon the 'find_multipaths' patchset from<br>
Ben Marzinski; it can be retrieved from<br>
<br>
github.com:/hreinecke/multipath-tools.git branch suse-resync<br>
<br>
Cheers,<br>
<br>
Hannes<br>
<br>
Hannes Reinecke (78):<br>
  libmultipath: remove compilation warning in devmapper.c<br>
  mpath_persist: Do not call exit() from a shared library<br>
  libmultipath: filter for missing property in get_refwwid()<br>
  Double uevent stacksize yet again<br>
  discovery: do not fail discovery on individual devices<br>
  libmultipath: Prefer deprecated 'getuid' callout<br>
  libmultipath: Skip paths with empty wwid<br>
  Make systemd installation path configurable<br>
  Add multipath rules for systemd support<br>
  Fixup multipathd.socket to resolve ordering dependeny<br>
  Fixup dependencies in multipathd.service<br>
  multipathd: set correct PID when running in debug mode<br>
  Do not print empty device strings during discovery<br>
  kpartx.rules: do not call blkid<br>
  Use 'SCSI_IDENT_.*' as the default property whitelist<br>
  Fixup wwid blacklist printing<br>
  Allow for empty path argument when printing information<br>
  Disable reassign maps per default<br>
  multipathd: implement 'list path <path>' cli command<br>
  Make checker_put() and prio_put() idempotent<br>
  Remove trailing linefeed from sysfs attributes<br>
  multipath: implement option '-u' for uevents<br>
  Install multipath rule under '56-multipath.rules'<br>
  multipath.rules: Whitelist devices<br>
  multipath.rules: fixup race condition with systemd<br>
  11-dm-mpath.rules: Import blkid values if all paths are down<br>
  kpartx.rules: Skip kpartx for multipath events<br>
  multipathd: handle DOMAP_RETRY<br>
  multipathd: cleanup foreground operation<br>
  Update hwtable for EMC XtremIO<br>
  multipath: check for running daemon when called with '-u'<br>
  Revert 'return PATH_DOWN for quiesced paths'<br>
  Do not treat 'transport-offline' paths as 'offline'<br>
  Check for valid DM_DEVICE_INFO before proceeding<br>
  Separate out uevent parsing functions<br>
  Use poll() when receiving uevents<br>
  mpath_persist: cleanup<br>
  kpartx: use standard 'major' and 'minor' macros<br>
  multipath: Use standard 'major' macro<br>
  Remove sysfs_get_dev<br>
  Add paths with a size of '0' as 'ghost' paths<br>
  Remove last argument from verify_paths()<br>
  Fixup device-mapper 'cookie' handling<br>
  multipath: do not print state 'orphan' for option '-l'<br>
  Return error when receiving CLI packet<br>
  Implement 'uxsock_timeout' keyword<br>
  Do not print empty multipaths section<br>
  multipathd: reload map if reinstate failed<br>
  multipathd: do not remove paths without uevents<br>
  Allow zero-sized devices during configuration<br>
  Rework uev_add_path()<br>
  multipathd: Issue warning on CLI command timeout<br>
  Use strlen() when checking for valid wwid<br>
  multipathd: Use standard lists for CLI handling<br>
  uxlsnr: use typedef for trigger function<br>
  multipathd: lock cli client list<br>
  multipath: enable sync support<br>
  Remove dm_udev_XXX wrapper functions<br>
  Revert to ACT_RELOAD in domap if the map exists<br>
  multipathd: use local variable for watchdog configuration<br>
  Ignore devices when sysfs_get_tgt_nodename fails<br>
  Skip USB devices during discovery<br>
  Read wwid from sysfs vpg_pg83 attribute<br>
  Assign local priority for NAA VPD descriptor<br>
  Use sysfs attribute vpd_pg80 to read serial number<br>
  Update multipath.conf.5 to clarify wwid generation<br>
  libmultipath: Fall back to SG_IO if no UID could be assigned<br>
  libmultipath: unset 'uid_attribute' on failure<br>
  Separate out vpd parsing functions<br>
  multipathd: use SG_IO as fallback to generate uid<br>
  Do not automatically fall back to vpd uid generation<br>
  libmultipath: make vpd page 0x80 optional<br>
  multipathd: push down lock in checkerloop()<br>
  Allow specific CLI commands to run unlocked<br>
  Push down vector lock during uevent processing<br>
  multipathd: timeout CLI commands when waiting for lock<br>
  multipathd: asynchronous configuration<br>
  multipathd: trigger all devices on startup<br>
<br>
 Makefile.inc                     |   8 +-<br>
 kpartx/devmapper.c               |  53 +++-<br>
 kpartx/devmapper.h               |  11 +-<br>
 kpartx/kpartx.c                  |  35 +--<br>
 kpartx/kpartx.rules              |  10 +-<br>
 libmpathpersist/mpath_persist.c  | 172 ++++++-----<br>
 libmpathpersist/mpath_updatepr.c |  20 +-<br>
 libmpathpersist/mpathpr.h        |   3 +-<br>
 libmultipath/blacklist.c         |   8 +-<br>
 libmultipath/blacklist.h         |   2 +-<br>
 libmultipath/checkers.c          |   2 +-<br>
 libmultipath/config.c            |   2 +<br>
 libmultipath/config.h            |   8 +-<br>
 libmultipath/configure.c         |  82 ++++--<br>
 libmultipath/defaults.h          |   4 +-<br>
 libmultipath/devmapper.c         |  77 +++--<br>
 libmultipath/devmapper.h         |   4 +-<br>
 libmultipath/dict.c              |  33 +++<br>
 libmultipath/discovery.c         | 613 ++++++++++++++++++++++++++++++++++-----<br>
 libmultipath/discovery.h         |   8 +-<br>
 libmultipath/hwtable.c           |  13 +<br>
 libmultipath/list.h              |  49 +++-<br>
 libmultipath/lock.h              |   4 +-<br>
 libmultipath/log_pthread.c       |   2 +-<br>
 libmultipath/print.c             |  20 +-<br>
 libmultipath/prio.c              |   4 +-<br>
 libmultipath/propsel.c           |   6 +-<br>
 libmultipath/structs_vec.c       |  29 +-<br>
 libmultipath/structs_vec.h       |   2 +-<br>
 libmultipath/sysfs.c             |  53 ++++<br>
 libmultipath/sysfs.h             |   2 +<br>
 libmultipath/uevent.c            | 316 ++++++++++++--------<br>
 libmultipath/uxsock.c            |  32 +-<br>
 libmultipath/uxsock.h            |   4 +-<br>
 multipath.conf.defaults          |   2 +-<br>
 multipath/11-dm-mpath.rules      |   8 +-<br>
 multipath/Makefile               |   2 +<br>
 multipath/dev_t.h                |   3 -<br>
 multipath/main.c                 |  53 +++-<br>
 multipath/multipath.8            |   6 +-<br>
 multipath/multipath.conf.5       |  42 ++-<br>
 multipath/multipath.rules        |  14 +<br>
 multipathd/cli.c                 |  47 ++-<br>
 multipathd/cli.h                 |   4 +-<br>
 multipathd/cli_handlers.c        |  64 +++-<br>
 multipathd/cli_handlers.h        |   1 +<br>
 multipathd/main.c                | 400 ++++++++++++++++---------<br>
 multipathd/main.h                |   2 +<br>
 multipathd/multipathd.service    |   4 +-<br>
 multipathd/multipathd.socket     |   8 +-<br>
 multipathd/uxclnt.c              |  26 +-<br>
 multipathd/uxclnt.h              |   2 +-<br>
 multipathd/uxlsnr.c              | 102 +++++--<br>
 multipathd/uxlsnr.h              |   8 +-<br>
 54 files changed, 1834 insertions(+), 655 deletions(-)<br>
 delete mode 100644 multipath/dev_t.h<br>
 create mode 100644 multipath/multipath.rules<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.4.5<br>
<br>
</font></span></blockquote></div><br></div>