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.6 #68

Merged
merged 33 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
787b6d3
11-dm-mpath.rules: fix warnings reported by udevadm verify
ldv-alt May 19, 2023
57ee6f9
dm-parts.rules: fix warning reported by udevadm verify
ldv-alt May 17, 2023
ea73333
multipath-tools: adapt HITACHI/OPEN- config to work with alua and mul…
xosevp May 31, 2023
1d3b27b
multipath-tools: fix spelling
xosevp Jun 15, 2023
1dd054a
libmultipath: add group_by_tpg path_grouping_policy
bmarzins Jun 7, 2023
3be3143
libmultipath: don't copy pgpolicy string in get_pgpolicy_name
bmarzins Jun 7, 2023
c9bdf91
libmultipath: add ALUA tpg path wildcard
bmarzins Jun 7, 2023
7ed582a
multipath-tools tests: add tests for group_by_tpg policy
bmarzins Jun 7, 2023
f6566b3
libmultipath: add "detect_pgpolicy" config option
bmarzins Jun 7, 2023
aa5a262
libmultipath: add "detect_pgpolicy_use_tpg" config option
bmarzins Jun 7, 2023
fb92d75
libmultipath: don't count PRIO_UNDEF paths for pathgroup priority
bmarzins Jun 7, 2023
31a31d9
multipath-tools tests: add tests to verify PRIO_UNDEF changes
bmarzins Jun 7, 2023
6ccd7b8
multipathd: only refresh priorities in update_prio()
bmarzins Jun 7, 2023
18975ce
multipathd: reload map if the path groups are out of order
bmarzins Jun 7, 2023
85bbf89
multipathd: don't assume mpp->paths will exist in need_switch_pathgroup
bmarzins Jun 7, 2023
d469731
multipath-tools: fix syntax and spelling errors
xosevp Jun 15, 2023
cc7d7d7
multipath-tools build: rename PKGCONFIG to PKG_CONFIG
zeha Jun 6, 2023
8ed9621
multipath-tools build: accept KBUILD_BUILD_TIMESTAMP from env
lamby Jun 6, 2023
44f1f08
libmultipath: dm_get_maps(): remove spurious assignment
mwilck Jun 26, 2023
058b5f5
libmultipath: fix dev_loss_tmo even if not set in configuration
mwilck Jun 30, 2023
c686005
libmultipath: ignore nvme devices if nvme native multipath is enabled
mwilck Jun 30, 2023
953230e
GitHub workflows: enable Debian "bookworm"
mwilck Jul 4, 2023
ccc4a02
GitHub workflows: use Fedora 37 in native.yaml
mwilck Jul 4, 2023
c2c08b0
GitHub workflows: switch to Ubuntu 22.04 runner
mwilck Jul 4, 2023
f220ab6
multipath-tools: fix docs
xosevp Jul 5, 2023
bd72039
multipath-tools: treat disable_changed_wwids like other deprecated ke…
xosevp Jul 7, 2023
bbb77f3
libmultipath: fix max_sectors_kb on adding path
ajmes Aug 23, 2023
fc9c4cf
libmultipath: bump version to 0.9.6
mwilck Jul 5, 2023
7f108a6
libmultipath: don't bother to recheck timeout
bmarzins Aug 31, 2023
1a9d340
libmultipath: make checker_timeout a path variable
bmarzins Aug 31, 2023
ea91463
libmultipath: make prioritizer timeouts work like checker timeouts
bmarzins Aug 31, 2023
df4da1b
libmultipath: standardize datacore prioritizer timeouts
bmarzins Aug 31, 2023
5fb0ce3
Fix hwtable test after "libmultipath: don't bother to recheck timeout"
mwilck Sep 1, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
upload-coverity-scan:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/foreign.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
jobs:

cross-build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os: [bullseye, sid]
os: [bullseye, bookworm, sid]
arch: [ppc64le, arm64, s390x]
container: ghcr.io/mwilck/multipath-cross-debian_cross-${{ matrix.os }}-${{ matrix.arch }}
steps:
Expand All @@ -37,12 +37,12 @@ jobs:
path: binaries.tar

test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: cross-build
strategy:
fail-fast: false
matrix:
os: [bullseye, sid]
os: [bullseye, bookworm, sid]
arch: [ppc64le, arm64, s390x]
steps:
- name: set container arch
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/multiarch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:

build-current:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
pull-params: "--platform linux/${{ matrix.arch }}"

build-old:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ on:

jobs:
stable:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
os:
- debian-buster
- debian-jessie
- debian-buster
- debian-bullseye
- fedora-36
- debian-bookworm
- fedora-37
- opensuse-leap
container: ghcr.io/mwilck/multipath-build-${{ matrix.os }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ SCSI_DH_MODULES_PRELOAD :=

EXTRAVERSION := $(shell rev=$$(git rev-parse --short=7 HEAD 2>/dev/null); echo $${rev:+-g$$rev})

# PKGCONFIG must be read from the environment to enable compilation
# PKG_CONFIG must be read from the environment to enable compilation
# in Debian multiarch setups
PKGCONFIG ?= pkg-config
PKG_CONFIG ?= pkg-config

ifeq ($(TOPDIR),)
TOPDIR = ..
Expand Down Expand Up @@ -56,8 +56,8 @@ pkgconfdir := $(usrlibdir)/pkgconfig
plugindir := $(prefix)/$(LIB)/multipath
configdir := $(prefix)/etc/multipath/conf.d
runtimedir := $(if $(shell test -L /var/run -o ! -d /var/run && echo 1),/run,/var/run)
devmapper_incdir := $(or $(shell $(PKGCONFIG) --variable=includedir devmapper),/usr/include)
libudev_incdir := $(or $(shell $(PKGCONFIG) --variable=includedir libudev),/usr/include)
devmapper_incdir := $(or $(shell $(PKG_CONFIG) --variable=includedir devmapper),/usr/include)
libudev_incdir := $(or $(shell $(PKG_CONFIG) --variable=includedir libudev),/usr/include)
kernel_incdir := /usr/include

ifeq ($(V),)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ https://github.com/opensvc/multipath-tools
This package provides the following binaries to drive the Device Mapper multipathing driver:

* multipath - Device mapper target autoconfig.
* multipathc - Interactive client for multipathd.
* multipathd - Multipath daemon.
* mpathpersist - Manages SCSI persistent reservations on dm multipath devices.
* kpartx - Create device maps from partition tables.
Expand Down
6 changes: 3 additions & 3 deletions create-config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(kernel_incdir)/scsi/fc/fc_els.h
FPIN_SUPPORT = 1
endif

libmount_h := $(shell $(PKGCONFIG) --variable=includedir mount)/libmount/libmount.h
libmount_h := $(shell $(PKG_CONFIG) --variable=includedir mount)/libmount/libmount.h
ifneq ($(call check_func,mnt_unref_cache,$(libmount_h)),0)
DEFINES += LIBMOUNT_HAS_MNT_UNREF_CACHE
endif
Expand All @@ -117,13 +117,13 @@ ifneq ($(call check_file,$(kernel_incdir)/linux/nvme_ioctl.h),0)
ANA_SUPPORT := 1
endif

ENABLE_LIBDMMP := $(call check_cmd,$(PKGCONFIG) --exists json-c)
ENABLE_LIBDMMP := $(call check_cmd,$(PKG_CONFIG) --exists json-c)

ifeq ($(ENABLE_DMEVENTS_POLL),0)
DEFINES += -DNO_DMEVENTS_POLL
endif

SYSTEMD := $(strip $(or $(shell $(PKGCONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \
SYSTEMD := $(strip $(or $(shell $(PKG_CONFIG) --modversion libsystemd 2>/dev/null | awk '{print $$1}'), \
$(shell systemctl --version 2>/dev/null | sed -n 's/systemd \([0-9]*\).*/\1/p')))


Expand Down
2 changes: 1 addition & 1 deletion kpartx/dm-parts.rules
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV{DM_UDEV_LOW_PRIORITY_FLAG}!="1", OPTIONS+="link_priority=50"
IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}"

# DM_TYPE only has a reasonable value for partitions on multipath.
ENV{DM_UUID}=="*-mpath-*", ENV{DM_TYPE}=="?*", ENV{DM_SERIAL}=="?*" \
ENV{DM_UUID}=="*-mpath-*", ENV{DM_TYPE}=="?*", ENV{DM_SERIAL}=="?*", \
SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_SERIAL}-part$env{DM_PART}"
ENV{DM_WWN}=="?*", ENV{DM_PART}=="?*", \
SYMLINK+="disk/by-id/wwn-$env{DM_WWN}-part$env{DM_PART}"
Expand Down
5 changes: 3 additions & 2 deletions kpartx/kpartx.8
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.\" ----------------------------------------------------------------------------
.\" Update the date below if you make any significant change.
.\" Make sure there are no errors with:
.\" groff -z -wall -b -e -t kpartx/kpartx.8
.\" man --warnings -E UTF-8 -l -Tutf8 -Z kpartx/kpartx.8 > /dev/null
.\"
.\" Update the date below if you make any significant change.
.\" ----------------------------------------------------------------------------
.
.TH KPARTX 8 2019-04-27 "Linux"
.TH KPARTX 8 2019-04-27 Linux
.
.
.\" ----------------------------------------------------------------------------
Expand Down
8 changes: 5 additions & 3 deletions libdmmp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ HEADERS := libdmmp/libdmmp.h

OBJS := libdmmp.o libdmmp_mp.o libdmmp_pg.o libdmmp_path.o libdmmp_misc.o

CPPFLAGS += -I$(libdmmpdir) -I$(mpathcmddir) $(shell $(PKGCONFIG) --cflags json-c)
CPPFLAGS += -I$(libdmmpdir) -I$(mpathcmddir) $(shell $(PKG_CONFIG) --cflags json-c)
CFLAGS += $(LIB_CFLAGS) -fvisibility=hidden

LIBDEPS += $(shell $(PKGCONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread
LIBDEPS += $(shell $(PKG_CONFIG) --libs json-c) -L$(mpathcmddir) -lmpathcmd -lpthread

all: $(LIBS) doc
.PHONY: doc clean install uninstall check speed_test dep_clean
Expand Down Expand Up @@ -74,8 +74,10 @@ doc: docs/man/dmmp_strerror.3
docs/man/dmmp_strerror.3: $(HEADERS)
$(Q)TEMPFILE=$(shell mktemp); \
cat $^ | perl docs/doc-preclean.pl >$$TEMPFILE; \
[ "$KBUILD_BUILD_TIMESTAMP" ] || \
KBUILD_BUILD_TIMESTAMP=`git log -n1 --pretty=%cd --date=iso -- $^`; \
export KBUILD_BUILD_TIMESTAMP; \
LC_ALL=C \
KBUILD_BUILD_TIMESTAMP=`git log -n1 --pretty=%cd --date=iso -- $^` \
perl docs/kernel-doc -man $$TEMPFILE | \
perl docs/split-man.pl docs/man; \
$(RM) -f $$TEMPFILE
Expand Down
5 changes: 3 additions & 2 deletions libmpathpersist/mpath_persistent_reserve_in.3
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.\" ----------------------------------------------------------------------------
.\" Update the date below if you make any significant change.
.\" Make sure there are no errors with:
.\" groff -z -wall -b -e -t libmpathpersist/mpath_persistent_reserve_in.3
.\" man --warnings -E UTF-8 -l -Tutf8 -Z libmpathpersist/mpath_persistent_reserve_in.3 > /dev/null
.\"
.\" 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 2018-06-15 Linux
.
.
.\" ----------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions libmpathpersist/mpath_persistent_reserve_out.3
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.\" ----------------------------------------------------------------------------
.\" Update the date below if you make any significant change.
.\" Make sure there are no errors with:
.\" groff -z -wall -b -e -t libmpathpersist/mpath_persistent_reserve_out.3
.\" man --warnings -E UTF-8 -l -Tutf8 -Z libmpathpersist/mpath_persistent_reserve_out.3 > /dev/null
.\"
.\" 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 2018-06-15 Linux
.
.
.\" ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion libmpathutil/libmpathutil.version
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/*
* Symbols exported by both libmpathutil and libmultipath
* libmpathutil exports just dummy symbols, intended to be overriden
* libmpathutil exports just dummy symbols, intended to be overridden
* by those in libmultipath.
* CAUTION - the version in libmpathutil.version and libmultipath.version
* must be THE SAME, otherwise the overriding will fail!
Expand Down
35 changes: 32 additions & 3 deletions libmultipath/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* Copyright (c) 2004, 2005 Christophe Varoqui
*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <libudev.h>

#include "checkers.h"
Expand Down Expand Up @@ -191,16 +193,43 @@ find_blacklist_device (const struct _vector *blist, const char *vendor,
return 0;
}

/*
* Test if nvme native multipath is enabled. If the sysfs file can't
* be accessed, multipath is either disabled at compile time, or no
* nvme driver is loaded at all. Thus treat errors as "no".
*/
static bool nvme_multipath_enabled(void)
{
static const char fn[] = "/sys/module/nvme_core/parameters/multipath";
int fd, len;
char buf[2];

fd = open(fn, O_RDONLY);
if (fd == -1)
return false;

len = read(fd, buf, sizeof(buf));
close(fd);

return (len >= 1 && buf[0] == 'Y');
}

int
setup_default_blist (struct config * conf)
{
struct blentry * ble;
struct hwentry *hwe;
int i;

if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", ORIGIN_DEFAULT))
return 1;

if (nvme_multipath_enabled()) {
if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z])",
ORIGIN_DEFAULT))
return 1;
} else {
if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])",
ORIGIN_DEFAULT))
return 1;
}
if (store_ble(conf->elist_property, "(SCSI_IDENT_|ID_WWN)", ORIGIN_DEFAULT))
return 1;

Expand Down
4 changes: 4 additions & 0 deletions libmultipath/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ merge_hwe (struct hwentry * dst, struct hwentry * src)
merge_num(retain_hwhandler);
merge_num(detect_prio);
merge_num(detect_checker);
merge_num(detect_pgpolicy);
merge_num(detect_pgpolicy_use_tpg);
merge_num(deferred_remove);
merge_num(delay_watch_checks);
merge_num(delay_wait_checks);
Expand Down Expand Up @@ -617,6 +619,8 @@ store_hwe (vector hwtable, struct hwentry * dhwe)
hwe->retain_hwhandler = dhwe->retain_hwhandler;
hwe->detect_prio = dhwe->detect_prio;
hwe->detect_checker = dhwe->detect_checker;
hwe->detect_pgpolicy = dhwe->detect_pgpolicy;
hwe->detect_pgpolicy_use_tpg = dhwe->detect_pgpolicy_use_tpg;
hwe->ghost_delay = dhwe->ghost_delay;
hwe->vpd_vendor_id = dhwe->vpd_vendor_id;

Expand Down
4 changes: 4 additions & 0 deletions libmultipath/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ struct hwentry {
int retain_hwhandler;
int detect_prio;
int detect_checker;
int detect_pgpolicy;
int detect_pgpolicy_use_tpg;
int deferred_remove;
int delay_watch_checks;
int delay_wait_checks;
Expand Down Expand Up @@ -171,6 +173,8 @@ struct config {
int retain_hwhandler;
int detect_prio;
int detect_checker;
int detect_pgpolicy;
int detect_pgpolicy_use_tpg;
int force_sync;
int deferred_remove;
int processed_main_config;
Expand Down
9 changes: 6 additions & 3 deletions libmultipath/configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ int setup_map(struct multipath *mpp, char **params, struct vectors *vecs)
pthread_cleanup_push(put_multipath_config, conf);

select_pgfailback(conf, mpp);
select_detect_pgpolicy(conf, mpp);
select_detect_pgpolicy_use_tpg(conf, mpp);
select_pgpolicy(conf, mpp);

/*
Expand Down Expand Up @@ -593,11 +595,12 @@ sysfs_set_max_sectors_kb(struct multipath *mpp, int is_reload)
ssize_t len;
int i, j, ret, err = 0;
struct udev_device *udd;
int max_sectors_kb;
int max_sectors_kb = mpp->max_sectors_kb;

if (mpp->max_sectors_kb == MAX_SECTORS_KB_UNDEF)
/* by default, do not initialize max_sectors_kb on the device */
if (max_sectors_kb == MAX_SECTORS_KB_UNDEF && !is_reload)
return 0;
max_sectors_kb = mpp->max_sectors_kb;
/* on reload, re-apply the user tuning on all the path devices */
if (is_reload) {
if (!has_dm_info(mpp) &&
dm_get_info(mpp->alias, &mpp->dmi) != 0) {
Expand Down
2 changes: 2 additions & 0 deletions libmultipath/defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON
#define DEFAULT_DETECT_PRIO DETECT_PRIO_ON
#define DEFAULT_DETECT_CHECKER DETECT_CHECKER_ON
#define DEFAULT_DETECT_PGPOLICY DETECT_PGPOLICY_ON
#define DEFAULT_DETECT_PGPOLICY_USE_TPG DETECT_PGPOLICY_USE_TPG_OFF
#define DEFAULT_DEFERRED_REMOVE DEFERRED_REMOVE_OFF
#define DEFAULT_DELAY_CHECKS NU_NO
#define DEFAULT_ERR_CHECKS NU_NO
Expand Down
1 change: 0 additions & 1 deletion libmultipath/devmapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,6 @@ dm_get_maps (vector mp)
}

vector_set_slot(mp, mpp);
mpp = NULL;
next:
next = names->next;
names = (void *) names + next;
Expand Down
Loading