Skip to content

Commit

Permalink
Merge pull request opensvc#85 from openSUSE/queue
Browse files Browse the repository at this point in the history
multipath-tools 0.9.9
  • Loading branch information
cvaroqui authored Jun 13, 2024
2 parents 3daacfd + 444ed8d commit efa6a26
Show file tree
Hide file tree
Showing 50 changed files with 1,068 additions and 326 deletions.
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

0 comments on commit efa6a26

Please sign in to comment.