Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipath-tools 0.9.9 #85

Merged
merged 54 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c6cba65
11-dm-mpath.rules: fix misspelled DM_UDEV_DISABLE_OTHER_RULES_FLAG
mwilck Mar 1, 2024
38a3572
multipathd: use condlog level for setscheduler error message
bmarzins Mar 2, 2024
1c4301a
multipathd: make multipathd scheduling configurable
bmarzins Mar 2, 2024
e5004de
libmpathutil: really always use glibc basename()
mwilck Apr 3, 2024
f4578a3
multipathd: make multipathd set priority to RLIMIT_RTPRIO
bmarzins Apr 9, 2024
3457c1e
multipathd: Set CPUWeight to 1000 and LimitRTPRIO to 10
bmarzins Apr 15, 2024
8647bfe
11-dm-mpath.rules: explain logic for device becoming ready while susp…
mwilck Mar 1, 2024
8f6205b
11-dm-mpath.rules: don't import DM_NOSCAN from udev db
mwilck Mar 1, 2024
bd0e5b2
11-dm-mpath.rules: don't import ID_FS_VERSION from udev db
mwilck Mar 1, 2024
e14c381
11-dm-mpath.rules: adapt MPATH_DEVICE_READY=0 logic to 10-dm.rules up…
mwilck Mar 1, 2024
170a0eb
11-dm-mpath.rules: adapt coldplug event handling ro 10-dm.rules update
mwilck Mar 1, 2024
63cfb25
11-dm-mpath.rules: don't import properties with new 13-dm-disk.rules
mwilck Mar 1, 2024
2f735d2
11-dm-mpath.rules: replace DM_SUSPENDED by .DM_SUSPENDED
mwilck Mar 1, 2024
84b9311
11-dm-mpath.rules: replace DM_NOSCAN by .DM_NOSCAN
mwilck Mar 1, 2024
7d44911
11-dm-mpath.rules: simplify PATH_FAILED case
mwilck Mar 6, 2024
6fbd878
11-dm-mpath.rules: make label names more intuitive
mwilck Mar 1, 2024
f8d7356
kpartx.rules: ignore DM_SUSPENDED
mwilck Mar 1, 2024
6a7524a
multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37
mwilck Apr 4, 2024
271076f
multipath-tools tests: fix CI failures with clang on Fedora Rawhide
mwilck Apr 5, 2024
7491dc6
GitHub actions: fixes for spelling CI
mwilck Mar 8, 2024
1b1d885
GitHub workflows: run workflows if workflow file has changed
mwilck Feb 27, 2024
955ff41
multipath-tools: add TGTDIR option
mwilck Apr 17, 2024
299f747
libmultipath: move get_udev_for_mpp to sysfs.c
mwilck Apr 17, 2024
f1762d5
libmultipath: add mp_find_path_by_devt()
mwilck Apr 17, 2024
4535e6d
Revert "libmultipath: fix max_sectors_kb on adding path"
mwilck Apr 11, 2024
3a41956
libmultipath: Only set max_sectors_kb on map creation
mwilck Apr 16, 2024
e5e20c7
libmultipath: set max_sectors_kb in adopt_paths()
mwilck Apr 16, 2024
94f4bd0
libmultipath: add wildcard %k for printing max_sectors_kb
mwilck Apr 17, 2024
f4b1164
multipath.conf(5): update documentation for max_sectors_kb
mwilck Apr 17, 2024
6d6451e
multipath-tools: simplify comment in hwtable
xosevp Apr 27, 2024
e5b1a60
multipath-tools: unify text in multipath.conf.5
xosevp Apr 27, 2024
f7ffed3
multipath-tools: update man pages dates
xosevp Apr 27, 2024
2553de3
libmultipath: export partmap_in_use
bmarzins Apr 25, 2024
6e0ec8d
libmultipath: change flush_on_last_del to fix a multipathd hang
bmarzins Apr 25, 2024
57063e9
libmultipath: remove redundant config option from InfiniBox config
bmarzins Apr 25, 2024
79dac34
libmultipath: pad dev_loss_tmo to avoid race with no_path_retry
bmarzins Apr 25, 2024
20aeeb6
libmultipath: fix deferred_remove function arguments
bmarzins Apr 25, 2024
d7aa1e5
libmultipath: use bitwise flags for map flushing API
mwilck May 2, 2024
8982edd
libmultipath: use bitwise flags for dm_simplecmd API
mwilck May 2, 2024
aa7ae4d
libmultipath: add argument names to some prototypes
mwilck May 2, 2024
a516598
GitHub Workflows: native.yaml: run for Fedora 40
mwilck May 3, 2024
52d6eb9
update NEWS.md
mwilck May 3, 2024
23849ec
multipath.conf.5.in: fix man page date
mwilck May 3, 2024
473c240
libmultipath: accept poorly chosen aliases in find_mp_by_str
bmarzins May 20, 2024
56ace5d
libmultipath: accept wwids in find_mp_by_str
bmarzins May 20, 2024
9067049
libmultipath: remove pathgroup wildcard options
NitinYewale May 30, 2024
fe7182e
multipath-tools man pages: don't assume multipath.socket is enabled
bmarzins May 30, 2024
949493d
libmultipath: print all values in snprint_failback
bmarzins May 30, 2024
aa60bd6
multipathd: Stop double counting map failures for no_path_retry > 0
bmarzins May 30, 2024
7793f60
multipath-tools man pages: add missing multipathd commands
bmarzins May 30, 2024
cef58af
libmultipath: change the vend/prod/rev printing
bmarzins May 30, 2024
8bb5483
multipath-tools man pages: Add format wildcard descriptions
bmarzins May 30, 2024
a2b59ce
More updates to NEWS.md
mwilck Jun 4, 2024
444ed8d
libmultipath: bump version to 0.9.9
mwilck May 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ blkid
bmarzins
cciss
CFLAGS
cgroups
christophe
clangd
clariion
Expand Down Expand Up @@ -67,8 +68,10 @@ fulldescr
gcc
getprkey
getprstatus
getrlimit
getuid
github
gitlab
GPT
hbtl
hds
Expand Down Expand Up @@ -113,6 +116,7 @@ LIO
lpthread
Lun
lvm
lvmteam
Marzinski
mpath
mpathb
Expand All @@ -139,6 +143,7 @@ OPTFLAGS
paramp
partx
pathgroup
petabytes
pgpolicy
plugindir
PNR
Expand Down Expand Up @@ -167,8 +172,10 @@ retrigger
rhabarber
rootprefix
rootprefixdir
rpmbuild
rport
rtpi
rtprio
sas
sbp
scsi
Expand Down Expand Up @@ -197,9 +204,11 @@ sys
sysfs
sysinit
tcp
terabytes
TESTDEPS
testname
tgill
TGTDIR
TIDS
tmo
tpg
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/spelling/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
\bdmmp_pgs\b
\bdmmp_mpath_kdev_name_get\b
\bfast_io_fail_tmo\b
\bLimitRTPRIO=?\b
\bmax_fds\b
\bmissing_uev_wait_timeout\b
\bMPATH_MAX_PARAM_LEN\b
Expand Down Expand Up @@ -86,6 +87,8 @@
\bprin_resvdescr\b
\bprout_param_descriptor\b
\brq_servact\b
\bRLIMIT_RTPRIO\b
\bSCHED_RT_PRIO\b
\bssize_t\b
\btrnptid_list\b
\buxsock_timeout\b
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/abi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- queue
- abi
paths:
- '.github/workflows/abi.yaml'
- '**.h'
- '**.c'
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/foreign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- queue
- tip
paths:
- '.github/workflows/foreign.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -15,6 +16,7 @@ on:
- master
- queue
paths:
- '.github/workflows/foreign.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/multiarch-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- queue
- tip
paths:
- '.github/workflows/multiarch-stable.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -15,6 +16,7 @@ on:
- master
- queue
paths:
- '.github/workflows/multiarch-stable.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/multiarch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- queue
- tip
paths:
- '.github/workflows/multiarch.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -15,6 +16,7 @@ on:
- master
- queue
paths:
- '.github/workflows/multiarch.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- queue
- tip
paths:
- '.github/workflows/native.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -15,6 +16,7 @@ on:
- master
- queue
paths:
- '.github/workflows/native.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -31,7 +33,7 @@ jobs:
- debian-buster
- debian-bullseye
- debian-bookworm
- fedora-39
- fedora-40
- opensuse-leap
container: ghcr.io/mwilck/multipath-build-${{ matrix.os }}
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rolling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- queue
- tip
paths:
- '.github/workflows/rolling.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -15,6 +16,7 @@ on:
- master
- queue
paths:
- '.github/workflows/rolling.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ on:
tags-ignore:
- "**"
paths:
- '.github/workflows/spelling.yml'
- 'README*'
- 'NEWS.md'
- '**.3'
- '**.5'
- '**.8'
Expand Down
8 changes: 4 additions & 4 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implici
$(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) $(W_URCU_TYPE_LIMITS)
CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \
-D_FILE_OFFSET_BITS=64 \
-DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" \
-DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(configdir)\" \
-DDEFAULT_CONFIGFILE=\"$(configfile)\" -DSTATE_DIR=\"$(statedir)\" \
-DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(TGTDIR)$(plugindir)\" \
-DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(TGTDIR)$(configdir)\" \
-DDEFAULT_CONFIGFILE=\"$(TGTDIR)$(configfile)\" -DSTATE_DIR=\"$(TGTDIR)$(statedir)\" \
-DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP
CFLAGS := -std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe
BIN_CFLAGS := -fPIE -DPIE
Expand Down Expand Up @@ -149,4 +149,4 @@ NV_VERSION_SCRIPT = $(DEVLIB:%.so=%-nv.version)

%: %.in
@echo creating $@
$(Q)sed 's:@CONFIGFILE@:'$(configfile)':g;s:@CONFIGDIR@:'$(configdir)':g;s:@STATE_DIR@:'$(statedir)':g;s:@RUNTIME_DIR@:'$(runtimedir)':g;s/@MODPROBE_UNIT@/'$(MODPROBE_UNIT)'/g;s:@BINDIR@:'$(bindir)':g' $< >$@
$(Q)sed 's:@CONFIGFILE@:'$(TGTDIR)$(configfile)':g;s:@CONFIGDIR@:'$(TGTDIR)$(configdir)':g;s:@STATE_DIR@:'$(TGTDIR)$(statedir)':g;s:@RUNTIME_DIR@:'$(runtimedir)':g;s/@MODPROBE_UNIT@/'$(MODPROBE_UNIT)'/g;s:@BINDIR@:'$(bindir)':g' $< >$@
82 changes: 82 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,87 @@
# multipath-tools Release Notes

## multipath-tools 0.9.9, 2024/05

### Important note

It is not recommended to use *lvm2* 2.03.24 and newer with multipath-tools
versions earlier than 0.9.9. See "Other major changes" below.

### User-Visible Changes

* *Changed realtime scheduling:* multipathd used to run at the highest possible
realtime priority, 99. This has always been excessive, and on some
distributions (e.g. RHEL 8), it hasn't worked at all. It is now possible to
set multipathd's real time scheduling by setting the hard limit for
`RLIMIT_RTPRIO` (see getrlimit(2)), which corresponds to the `rtprio`
setting in limits.conf and to `LimitRTPRIO=` in the systemd unit file. The
default in the systemd unit file has been set to 10. If the limit is set to
0, multipathd doesn't attempt to enable real-time scheduling.
Otherwise, it will try to set the scheduling priority to the given value.
Fixes [#82](https://github.com/opensvc/multipath-tools/issues/82).
* *Changed normal scheduling:* In order to make sure that multipathd has
sufficient priority even if real time scheduling is switched off, the
`CPUWeight=` setting in the unit file is set to 1000. This is necessary
because regular nice(2) values have no effect in systems with cgroups enabled.
* *Changed handling of `max_sectors_kb` configuration:* multipathd applies
the `max_sectors_kb` setting only during map creation, or when a new path is
added to an existing map. The kernel makes sure that the multipath device
never has a larger `max_sectors_kb` value than any of its configured path
devices. The reason for this change is that applying `max_sectors_kb` on
live maps can cause IO errors and data loss in rare situations.
It can now happen that some path devices have a higher `max_sectors_kb`
value than the map; this is not an error. It is not possible any more to
decrease `max_sectors_kb` in `multipath.conf` and run `multipathd
reconfigure` to "apply" this setting to the map and its paths. If decreasing
the IO size is necessary, either destroy and recreate the map, or remove one
path with `multipathd del path $PATH`, run `multipathd reconfigure`, and
re-add the path with `multipathd add path $PATH`.
* *New wildcard %k:* The wildcard `%k` for `max_sectors_kb` has been added to
the `multipathd show paths format` and `multipathd show maps format`
commands.
* *Changed semantics of flush_on_last_del:* The `flush_on_last_del` option
now takes the values `always` , `unused`, or `never`. `yes` and `no`
are still accepted as aliases for `always` and `unused`, respectively.
`always` means that when all paths for a multipath map have been removed,
*outstanding IO will be failed* and the map will be deleted. `unused` means
that this will only happen when the map is not mounted or otherwise opened.
`never` means the map will only be removed if the `queue_if_no_path`
feature is off.
This fixes a problem where multipathd could hang when the last path of
a queueing map was deleted.
* *Better parsing of `$map` arguments in multipathd interactive shell*: The
`$map` argument in commands like `resize map $map` now accepts a WWID,
and poorly chosen map aliases that could be mistaken for device names.
* *Added documentation for CLI wildcards*. The wildcards used in the `show
maps format` and `show paths format` commands are documented in the
*multipathd(8)* man page now.
* *`%s` wildcard for paths:* this wildcard in `show paths format` now prints
the product revision, too.

### Other major changes

* Adapted the dm-mpath udev rules such that they will work with the modified
device mapper udev rules (`DM_UDEV_RULES_VSN==3`, lvm2 >= 2.03.24). They are
still compatible with older versions of the device-mapper udev
rules (lvm2 < 2.03.24). If lvm2 2.03.24 or newer is installed, it is
recommended to update multipath-tools to 0.9.9 or newer.
See also [LVM2 2.03.24 release notes](https://gitlab.com/lvmteam/lvm2/-/tags/v2_03_24).

### Bug fixes

* Fixed misspelled DM_UDEV_DISABLE_OTHER_RULES_FLAG in 11-dm-mpath.rules
* Always use `glibc_basename()` to avoid some issues with MUSL libc.
Fixes [#84](https://github.com/opensvc/multipath-tools/pull/84).
* Fixed map failure counting for `no_path_retry > 0`.
* The wildcards for path groups are not available for actual
commands and have thus been removed from the `show wildcards` command
output.

### Other

* Build: added `TGTDIR` option to simplify building for a different target
host (see README.md).

## multipath-tools 0.9.8, 2024/02

### User-Visible Changes
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,39 @@ sufficient control. See `Makefile.inc` for even more fine-grained control.
On such distributions, override `unitdir` and `libudevdir` to use systemd's
`rootprefix`: `make libudevdir=/lib/udev unitdir=/lib/systemd/system`

### prefix, DESTDIR and TGTDIR

`prefix` and related variables are included in compiled-in paths like
`plugindir` and are used by `make install`. Using `prefix` is useful if
multipath-tools is built locally on the same host where it's supposed to be
installed.

By convention, the `DESTDIR` variable is prepended to all paths by `make
install`, but not to any compiled-in paths.
It is useful if the software is built on one system (build host) but intended
to be run on another system (installation host). This is typically used in build
systems like *rpmbuild* to set a root directory for all the installed
files.

On the contrary, the `TGTDIR` variable is used for compiled-in paths only, and
ignored by `make install`. It is useful for running multipath-tools in a separate
subdirectory in the installation host, mostly for testing / development
purposes.

For example,

make prefix=/opt DESTDIR=/build TGTDIR=/test install

will install plugins into `/build/opt/lib64/multipath` on the build
host. On the installation host, the plugins will be expected to be found under
`/test/opt/lib64/multipath`. If the developer runs

rsync -a $BUILD_HOST:$DESTDIR/ $INSTALL_HOST:$TGTDIR/

and adds `$TGTDIR/lib64` to `LD_LIBRARY_PATH` on the installation host, the
multipath binaries installed under `$TGTDIR` will find their plugins and
configuration files in the expected compiled-in paths.

### Compiler Options

Use `OPTFLAGS` to change optimization-related compiler options;
Expand Down
2 changes: 1 addition & 1 deletion kpartx/kpartx.rules
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG1}=="1", GOTO="mpath_kpartx_end"
ENV{MPATH_UNCHANGED}=="1", GOTO="mpath_kpartx_end"

# Don't run kpartx now if we know it will fail or hang.
ENV{DM_SUSPENDED}=="1", GOTO="mpath_kpartx_end"
# This is required for device mapper rules v2 compatibility.
ENV{DM_NOSCAN}=="1", GOTO="mpath_kpartx_end"

# Run kpartx
Expand Down
2 changes: 1 addition & 1 deletion libmpathpersist/mpath_persistent_reserve_in.3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.\" Update the date below if you make any significant change.
.\" ----------------------------------------------------------------------------
.
.TH MPATH_PERSISTENT_RESERVE_IN 3 2018-06-15 Linux
.TH MPATH_PERSISTENT_RESERVE_IN 3 2024-02-09 Linux
.
.
.\" ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion libmpathpersist/mpath_persistent_reserve_out.3
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.\" Update the date below if you make any significant change.
.\" ----------------------------------------------------------------------------
.
.TH MPATH_PERSISTENT_RESERVE_OUT 3 2018-06-15 Linux
.TH MPATH_PERSISTENT_RESERVE_OUT 3 2024-02-09 Linux
.
.
.\" ----------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions libmpathutil/libmpathutil.version
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,7 @@ LIBMPATHUTIL_2.0 {
vector_move_up;
vector_sort;
};

LIBMPATHUTIL_2.1 {
libmp_basename;
};
5 changes: 1 addition & 4 deletions libmpathutil/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,15 @@ strchop(char *str)
return i;
}

#ifndef __GLIBC__
/*
* glibc's non-destructive version of basename()
* License: LGPL-2.1-or-later
*/
static const char *__basename(const char *filename)
const char *libmp_basename(const char *filename)
{
char *p = strrchr(filename, '/');
return p ? p + 1 : filename;
}
#define basename(x) __basename(x)
#endif

int
basenamecpy (const char *src, char *dst, size_t size)
Expand Down
5 changes: 5 additions & 0 deletions libmpathutil/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
#include <stdio.h>

size_t strchop(char *);

const char *libmp_basename(const char *filename);
#ifndef __GLIBC__
#define basename(x) libmp_basename(x)
#endif
int basenamecpy (const char *src, char *dst, size_t size);
int filepresent (const char *run);
char *get_next_string(char **temp, const char *split_char);
Expand Down
Loading
Loading