[dm-devel] Basic Github CI for multipath-tools

2020-12-18 Thread Martin Wilck
Hi Christophe, all, I have created a basic CI for multipath-tools on github: https://github.com/openSUSE/multipath-tools/actions It builds multipath-tools with different compilers and runs the unit tests. It's currently on the "upstream-tip" branch only, which is otherwise identical to

Re: [dm-devel] [PATCH 6/6] multipath.conf.5: Improve checker_timeout description

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > I was asked to explain how checker_timeout works for checkers like > directio, that don't issue scsi commands with an explicit timeout > > Signed-off-by: Benjamin Marzinski > --- > multipath/multipath.conf.5 | 9 +++-- > 1 file

Re: [dm-devel] [PATCH 3/6] libmultipath: warn about missing braces at end of multipath.conf

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > Multipath doesn't warn when multipath.conf is missing closing braces > at > the end of the file. This has confused people about the correct > config > file syntax, so add a warning. > > Signed-off-by: Benjamin Marzinski Reviewed-by:

Re: [dm-devel] [PATCH 5/6] multipathd: Fix multipathd stopping on shutdown

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > According to man "systemd.special" > > "shutdown.target: ... Services that shall be terminated on system > shutdown shall add Conflicts= and Before= dependencies to this unit > for > their service unit, which is implicitly done when >

Re: [dm-devel] [PATCH 4/6] libmultipath: ignore multipaths sections without wwid option

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > "multipathd show config local" was crashing in find_mp_by_wwid() if > the multipath configuration included a multipaths section that did > not set a wwid option. There is no reason to keep a mpentry that > didn't set its wwid. Remove

Re: [dm-devel] [PATCH 2/6] mpathpersist: update prkeys file on changing registrations

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > When the "reservation_key" option is set to "file" and Register > command > is run with both the current Reservation Key and a new Service Action > Reservation Key, mpathpersist will change the registration, but will > not > update the

Re: [dm-devel] [PATCH 1/6] mpathpersist: Fix Register and Ignore with 0x00 SARK

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 17:06 -0600, Benjamin Marzinski wrote: > When the Register and Ignore command is run with sg_persist, if a > 0x00 > Service Action Reservation Key is given or the --param-sark option is > not used at all, sg_persist will clear the > registration. mpathpersist > will fail

Re: [dm-devel] one warning in current upstream-queue branch

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 23:23 +0100, Xose Vazquez Perez wrote: > With clang-11: Thanks. I've just sent a trivial patch to fix it. Martin -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] libmultipath: fix format warning with clang

2020-12-18 Thread mwilck
From: Martin Wilck Reported-by: Xose Vazquez Perez --- libmultipath/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmultipath/log.c b/libmultipath/log.c index 6498c88..10fa32c 100644 --- a/libmultipath/log.c +++ b/libmultipath/log.c @@ -125,6 +125,7 @@ void log_reset (char

[dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests

2020-12-18 Thread mwilck
From: Martin Wilck They break "make valgrind-test". Signed-off-by: Martin Wilck --- tests/mpathvalid.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/mpathvalid.c b/tests/mpathvalid.c index 5ffabb9..cfe4bae 100644 --- a/tests/mpathvalid.c +++ b/tests/mpathvalid.c @@ -381,6

[dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests

2020-12-18 Thread mwilck
From: Martin Wilck We need to the same thing for valgrind tests as we did in 448752f ("libmultipath: create separate .so for unit tests"). Signed-off-by: Martin Wilck --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index

Re: [dm-devel] [PATCH 1/2] multipath-tools tests: unversioned .so for valgrind tests

2020-12-18 Thread Benjamin Marzinski
On Fri, Dec 18, 2020 at 11:27:13PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > We need to the same thing for valgrind tests as we did in > 448752f ("libmultipath: create separate .so for unit tests"). > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH] libmultipath: fix format warning with clang

2020-12-18 Thread Benjamin Marzinski
On Fri, Dec 18, 2020 at 11:37:53PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > Reviewed-by: Benjamin Marzinski > Reported-by: Xose Vazquez Perez > --- > libmultipath/log.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libmultipath/log.c b/libmultipath/log.c > index

Re: [dm-devel] [PATCH 2/2] multipath-tools unit tests: fix memory leaks in mpathvalid tests

2020-12-18 Thread Benjamin Marzinski
On Fri, Dec 18, 2020 at 11:27:14PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > They break "make valgrind-test". > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > tests/mpathvalid.c | 4 > 1 file changed, 4 insertions(+) > > diff --git

[dm-devel] [PATCH 5/6] multipathd: Fix multipathd stopping on shutdown

2020-12-18 Thread Benjamin Marzinski
According to man "systemd.special" "shutdown.target: ... Services that shall be terminated on system shutdown shall add Conflicts= and Before= dependencies to this unit for their service unit, which is implicitly done when DefaultDependencies=yes is set (the default)." multipathd.service sets

[dm-devel] [PATCH 2/6] mpathpersist: update prkeys file on changing registrations

2020-12-18 Thread Benjamin Marzinski
When the "reservation_key" option is set to "file" and Register command is run with both the current Reservation Key and a new Service Action Reservation Key, mpathpersist will change the registration, but will not update the prkeys file. This means that future paths that come online will not be

[dm-devel] [PATCH 6/6] multipath.conf.5: Improve checker_timeout description

2020-12-18 Thread Benjamin Marzinski
I was asked to explain how checker_timeout works for checkers like directio, that don't issue scsi commands with an explicit timeout Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[dm-devel] [PATCH 0/6] More misc multipath patches

2020-12-18 Thread Benjamin Marzinski
The first two patches fix issues with mpathpersist. The second two deal with minor configuration file issues. The fifth patch deals with a problem with multipathd.service the could cause multipathd to not get stopped until after final.target was reached, causing shutdown errors. The last patch is

[dm-devel] [PATCH 4/6] libmultipath: ignore multipaths sections without wwid option

2020-12-18 Thread Benjamin Marzinski
"multipathd show config local" was crashing in find_mp_by_wwid() if the multipath configuration included a multipaths section that did not set a wwid option. There is no reason to keep a mpentry that didn't set its wwid. Remove it in merge_mptable(). Signed-off-by: Benjamin Marzinski ---

[dm-devel] [PATCH 3/6] libmultipath: warn about missing braces at end of multipath.conf

2020-12-18 Thread Benjamin Marzinski
Multipath doesn't warn when multipath.conf is missing closing braces at the end of the file. This has confused people about the correct config file syntax, so add a warning. Signed-off-by: Benjamin Marzinski --- libmultipath/parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[dm-devel] [PATCH 1/6] mpathpersist: Fix Register and Ignore with 0x00 SARK

2020-12-18 Thread Benjamin Marzinski
When the Register and Ignore command is run with sg_persist, if a 0x00 Service Action Reservation Key is given or the --param-sark option is not used at all, sg_persist will clear the registration. mpathpersist will fail with an error. This patch fixes mpathpersist to work like sg_persist in

Re: [dm-devel] [PATCH] libmultipath: fix format warning with clang

2020-12-18 Thread Xose Vazquez Perez
On 12/18/20 11:37 PM, mwi...@suse.com wrote: From: Martin Wilck Reported-by: Xose Vazquez Perez Tested-by: Xose Vazquez Perez --- libmultipath/log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmultipath/log.c b/libmultipath/log.c index 6498c88..10fa32c 100644 ---

[dm-devel] one warning in current upstream-queue branch

2020-12-18 Thread Xose Vazquez Perez
With clang-11: [...] make -C libmultipath [...] clang --std=gnu99 -O2 -g -fstack-protector-strong --param=ssp-buffer-size=4 -Werror -Wall -Wextra -Wformat=2 -Werror=implicit-int -Werror=implicit-function-declaration -Werror=format-securit y -Werror=cast-qual -pipe -DBIN_DIR=\"/sbin\"

Re: [dm-devel] [PATCH 2/7] libmultipath: protect logarea with logq_lock

2020-12-18 Thread Martin Wilck
On Thu, 2020-12-17 at 18:03 -0600, Benjamin Marzinski wrote: > On Thu, Dec 17, 2020 at 12:00:13PM +0100, mwi...@suse.com wrote: > > > > -void free_logarea (void) > > +static void free_logarea (void) > > { > > FREE(la->start); > > FREE(la->buff); > > I realize that the log area can only

Re: [dm-devel] [PATCH v3 0/5] Misc Multipath patches

2020-12-18 Thread Martin Wilck
On Thu, 2020-12-17 at 16:50 -0600, Benjamin Marzinski wrote: > This is a set of unrelated patches, based on top of my previous "add > library to check if device is a valid path" patchset. The first two > patches add a new config option, eh_deadline, that sets the scsi > sysfs > value of the same

[dm-devel] [PATCH v5 22/29] multipath: fix leak in check_path_valid()

2020-12-18 Thread mwilck
From: Martin Wilck If path status was successfully determined before calling store_pathvec(), free_path() wasn't called. Reviewed-by: Benjamin Marzinski Signed-off-by: Martin Wilck --- multipath/main.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-)

Re: [dm-devel] [PATCH 4/7] libmultipath: force map reload if udev incomplete

2020-12-18 Thread Martin Wilck
On Fri, 2020-12-18 at 16:06 +0100, Martin Wilck wrote: > > If this happens, the udev db for the affected maps looks more or less > like this: > > DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG="1" > DM_UDEV_DISABLE_DISK_RULES_FLAG="1" > DM_UDEV_DISABLE_OTHER_RULES_FLAG="1" > > The device-mapper hotplug

Re: [dm-devel] [PATCH 4/7] libmultipath: force map reload if udev incomplete

2020-12-18 Thread Martin Wilck
On Thu, 2020-12-17 at 23:48 -0600, Benjamin Marzinski wrote: > On Thu, Dec 17, 2020 at 12:00:15PM +0100, mwi...@suse.com wrote: > > From: Martin Wilck > > > > We've recently observed various cases of incompletely processed > > uevents > > during initrd processing. Typically, this would leave a

Re: [dm-devel] [PATCH 7/7] libmultipath.version: add missing symbol

2020-12-18 Thread Benjamin Marzinski
On Thu, Dec 17, 2020 at 12:00:18PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > The weightedpath prioritizer uses get_next_string(). I'd overlooked > this before. This was found with the help of the previous patch. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 6/7] multipath-tools: make sure plugin DSOs use symbol versions

2020-12-18 Thread Benjamin Marzinski
On Thu, Dec 17, 2020 at 12:00:17PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > By adding -Wl,-z,defs, we'll get warnings about unresolved symbols > at the linking stage. This way we make sure our plugins (checkers etc.) > will use versioned symbols from libmultipath, and incompatible

Re: [dm-devel] [PATCH 5/7] multipath-tools: avoid access to /etc/localtime

2020-12-18 Thread Benjamin Marzinski
On Thu, Dec 17, 2020 at 12:00:16PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > If the root file system is multipathed, and IO is queued because all paths > are failed, multipathd may block trying to access the root FS, and thus be > unable to reinstate paths. One file that is

Re: [dm-devel] [PATCH 4/7] libmultipath: force map reload if udev incomplete

2020-12-18 Thread Benjamin Marzinski
On Thu, Dec 17, 2020 at 12:00:15PM +0100, mwi...@suse.com wrote: > From: Martin Wilck > > We've recently observed various cases of incompletely processed uevents > during initrd processing. Typically, this would leave a dm device in > the state it had after the initial "add" uevent, which is

Re: [dm-devel] [PATCH 2/7] libmultipath: protect logarea with logq_lock

2020-12-18 Thread Benjamin Marzinski
On Fri, Dec 18, 2020 at 05:24:25PM +0100, Martin Wilck wrote: > On Thu, 2020-12-17 at 18:03 -0600, Benjamin Marzinski wrote: > > On Thu, Dec 17, 2020 at 12:00:13PM +0100, mwi...@suse.com wrote: > > > > > > -void free_logarea (void) > > > +static void free_logarea (void) > > > { > > >