-
Notifications
You must be signed in to change notification settings - Fork 49
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.10.0 #94
Conversation
Forgot the comparison in the "if" statement. Fixes 8a38983 ("multipathd: sync features on flush_map failure corner case") Signed-off-by: Benjamin Marzinski <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Previously detect_alua was setting pp->tpgs if the path state was either PATH_UP or PATH_REMOVED. Setting pp->tpgs for PATH_REMOVED makes no sense. PATH_UP is the only state that path_offline() returns where we should set pp->tpgs, so just check for that, instead of checking for all the states where we shouldn't set pp->tpgs. Signed-off-by: Benjamin Marzinski <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
multipath is not currently running the cleanup_functions from __attribute__((cleanup(cleanup_function))) when threads are cancelled. To do this, it needs to be compiled with -fexceptions https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Common-Variable-Attributes.html#index-cleanup-variable-attribute Signed-off-by: Benjamin Marzinski <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Use the cleanup attribute to make sure that alias is freed if cli_add_map() is cancelled. Signed-off-by: Benjamin Marzinski <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
This aligns the description of prio_args for path_latency prio and the actual code. Signed-off-by: Kou Wenqi <[email protected]> Reviewed-by: Martin Wilck <[email protected]> Signed-off-by: Martin Wilck <[email protected]>
Taken from Huawei UltraPath multipathing doc: https://support.huawei.com/enterprise/en/doc/EDOC1100362072/4a563777/showing-array-models-supported-by-the-ultrapath ===================== HUASY Dorado2100 HUAWEI Dorado2100 HUAWEI Dorado2100 G2 HUASY Dorado5100 HUAWEI Dorado5100 HUAWEI HVS85T HUAWEI HVS88T HS S2100 HUAWEI S2100 HUASY S2200T HUAWEI S2200T HS S2300 HUAWEI S2300 HS S2300E HUAWEI S2300E HS S2600 HUAWEI S2600 HS S2600T HUASY S2600T HUAWEI S2600T HUAWEI S2900 HUASY S3900 HUAWEI S3900 HUASY S3900-M200 HUAWEI S3900-M200 HUASY S3900-M300 HUAWEI S3900-M300 HS S5100 HUAWEI S5100 HS S5300 HUASY S5300 HUAWEI S5300 HS S5500 HUAWEI S5500 HUASY S5500T HUAWEI S5500T HS S5600 HUAWEI S5600 HUASY S5600T HUAWEI S5600T HUASY S5800T HUAWEI S5800T HUASY S5900-M100 HUAWEI S5900-M100 HUASY S5900-M200 HUAWEI S5900-M200 HS S6800E HUAWEI S6800E HUASY S6800T HUAWEI S6800T HUASY S6900 HUAWEI S6900 HUASY S6900-M100 HUAWEI S6900-M100 HS S8000 HUAWEI S8000 HS S8000-I HUASY S8000-I HUAWEI S8000-I HS V1500 HUAWEI V1500 HS V1500N HUAWEI V1500N HS V1600N HUAWEI V1600N HS V1800 HUAWEI V1800 HS VIS6000 HUAWEI VIS6000 HS VIS6000T HUAWEI VIS6000T ===================== Cc: Martin Wilck <[email protected]> Cc: Benjamin Marzinski <[email protected]> Cc: Christophe Varoqui <[email protected]> Cc: DM-DEVEL ML <[email protected]> Signed-off-by: Xose Vazquez Perez <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Taken from Huawei UltraPath multipathing doc: https://support.huawei.com/enterprise/en/doc/EDOC1100362072/4a563777/showing-array-models-supported-by-the-ultrapath ============ AnyStor XSG1 HUAWEI XSG1 Marstor XSG1 NETPOSA XSG1 SanM XSG1 SUGON XSG1 UDsafe XSG1 ============ Cc: Martin Wilck <[email protected]> Cc: Benjamin Marzinski <[email protected]> Cc: Christophe Varoqui <[email protected]> Cc: DM-DEVEL ML <[email protected]> Signed-off-by: Xose Vazquez Perez <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Include openSUSE Tumbleweed as another rolling release with support for armv7 and i386 architectures. Signed-off-by: Martin Wilck <[email protected]>
The previous fix for the CI under arm/v7 was incomplete, and actually broke the tests under openSUSE Tumbleweed. Closer examination showed that the issues were caused by Debian's move to 64bit time_t on some 32 bit architectures [1][2]. This effort causes _TIME_BITS=64 to be set by gcc internally, and introduces symbol redirections for libaio [3], on Debian with gcc 13 and newer only. Fix the conditions for symbol remappings in wrap64.h. [1] https://wiki.debian.org/ReleaseGoals/64bit-time [2] https://salsa.debian.org/toolchain-team/gcc/-/commit/d82fb8a8ab7b84f61fb8290a2c3aa2e3f54e7b8a [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062218 Fixes: 6a7524a ("multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37") Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Same fix as in 6a7524a ("multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37"). Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
The behavior of "echo -e" is not part of the POSIY standard and different shells handle it differently. OTOH, /bin/echo isn't necessarily available, either. Use printf instead, which is part of POSIX. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
The path in the unit file should match the actual installation path. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
The unit files and udev rules that use @bindir@ for substitutions have the installation target's point of view, they must include $(TGTDIR) (which is empty by default). Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
The path for kpartx should match the installed binary. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
compile_commands.json serves as input for clangd, while working with lsp under emacs. It's normal for functions and parameters to be unused while writing code. Therefore suppress -Werror for this use case. clangd will display the warnings. Use "make testprogs" to generate compile_commands.json, in order to be able to use clangd for the CI code, too. Finally, don't remove compile_commands.json with "make clean". Normally the compile commands remain the same, even if a clean rebuild of the binaries is necessary. Put the file into .gitignore instead. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Unlike the .o.wrap files for the CI tests themselves, these are not automatically deleted by "make" as intermediate files. Ignore them. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
DM_DEVICE_INFO aka the kernel's DM_DEV_STATUS ioctl, is sufficient to fetch the map name, and more lightweight than DM_DEVICE_STATUS, which maps to the kernel's DM_TABLE_STATUS ioctl. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
dm_task_no_open_count() only sets DM_SKIP_BDGET_FLAG in the dm task, which has been ignored by the kernel since 5c6bd75d06db ("[PATCH] dm: prevent removal if open") (v2.6.18 / 2006). Even for older kernels, not setting this flag has only a minor, performance-related effect (skipping one call to bdget_disk()). Don't use this dead API any more. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
This function is useful in multiple callers. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Export cleanup_multipath_and_paths(), which will be used by multipath. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
This allows us to get rid of a lot of goto statements, and generally obtain cleaner code. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Also, make the function static. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
libmp_mapinfo() is intended as a generic abstraction for retrieving information from the kernel device-mapper driver. It retrieves the information that the caller needs, with a minimal set of DM ioctls, and never more then 2 ioctl calls. libdm's DM_DEVICE_TABLE and DM_DEVICE_STATUS calls map to the kernel's DM_TABLE_STATUS ioctl, with or without the DM_STATUS_TABLE_FLAG set, respectively. DM_TABLE_STATUS always retrieves the basic map status (struct dm_info) and the map UUID and name, too. Note: I'd prefer to use an unnamed struct instead of _u in union libmp_map_identifer. But doing using an unnamed struct and and initializing the union like this in a function argument: func((mapid_t) { .major = major, .minor = minor }) is not part of C99, and not supported in gcc 4.8, which we still support. Likewise, the following syntax for initializing an empty struct: (mapinfo_t) { 0 } is not supported on all architectures we support (notably clang 3.5 under Debian Jessie). Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Unfortunately, we need several ugly compatibility macros again in order to make these tests work with the entire set of compilers and libraries supported by multipath-tools. Details are found in comments in the code. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
... and replace it by calls to the new API. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Only the typedef names are used in the rest of the code, so we don't need these struct names. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Also remove some superfluous "extern" qualifiers in mpath_persist.h. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Also remove last mentions of __setup_multipath(), which has been removed in e5debe0 ("multipathd: don't modify the multipath device on show commands"). Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
This isn't strictly required by glibc, but "struct _vector" is now the only public identifier starting with underscore, so let's replace it, too. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
This may have been necessary in the old days, but it isn't necessary any more now. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
Hardware dependent, and only for SCSI devices. Cc: Martin Wilck <[email protected]> Cc: Benjamin Marzinski <[email protected]> Cc: Christophe Varoqui <[email protected]> Cc: DM-DEVEL ML <[email protected]> Signed-off-by: Xose Vazquez Perez <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
"multipath -t" and "multipath -T" might show the wrong multipathd configuration items "retrigger_tries" and "force_sync". Make sure they don't. Signed-off-by: Kou Wenqi <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Reviewed-by: Martin Wilck <[email protected]>
__mpath_connect() was part of our public ABI. Instead of removing it completely, define it as a weak alias of the new mpath_connect__(). This way, programs linked against previous versions of libmpathcmd will continue to work. This shouldn't interfere with general symbol naming rules, as a weak symbol won't override a library symbol of the same name. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
__mpath_persistent_reserve_{in,out}() were part of our public ABI. Instead of removing them completely, define it as a weak aliases. This way, programs linked against previous versions of libmpathpersist will continue to work. This shouldn't interfere with general symbol naming rules, as a weak symbol won't override a library symbol of the same name. Signed-off-by: Martin Wilck <[email protected]> Reviewed-by: Benjamin Marzinski <[email protected]>
It's hardware dependent. Cc: Martin Wilck <[email protected]> Cc: Benjamin Marzinski <[email protected]> Cc: Christophe Varoqui <[email protected]> Cc: DM-DEVEL ML <[email protected]> Signed-off-by: Xose Vazquez Perez <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
…onfig as weak When linking libmultipath & libmpathutil with -Bsymbolic-non-weak-functions, multipathd segfaults because the weak nature of these symbols is not recognized. Add the necessary attributes to make that clear to the linker. Fixes: opensvc#26 # sort of Tested-by: ns <[email protected]> Reviewed-by: Martin Wilck <[email protected]>
Signed-off-by: Martin Wilck <[email protected]>
The link for #88 should be "/multipath-tools/pull/88" not "/multipath-tools/pull/93". |
Ups thanks. |
Signed-off-by: Martin Wilck <[email protected]>
Setting this as "ready for review" now. All relevant patches have been reviewed on the mailing list, anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@cvaroqui , 0.10.0 tag is missing: https://github.com/opensvc/multipath-tools/tags |
multipath-tools 0.10.0, 2024/08
@cvaroqui, @bmarzins, Please comment on the version number!
There were serveral possibilities after
0.9.9
, including0.9.10
,0.10.0
, and even1.0.0
. I don't think1.0
is justified yet, and we've never used a last digit higher than 9 before, so I thought0.10.0
was a reasonable choice. The "bump" of the second field indicates some major changes, which is true for this release, even though the number of user-visible changes is low. Anyway, this isn't cast in stone, let me know if you disagree.User-Visible Changes
multipathd show daemon
command now shows(reconfigure pending)
if a reconfiguration has been triggered but not finished yet.
Other major changes
map in turn, rather than walking linearly through the list of paths. Paths
for different multipath maps will be checked at different time offsets in
the
polling_interval
time span, which distributes the load caused bypath checking more evenly over time.
All functions that retrieve information about DM maps have been converted
to use just one worker function, libmp_mapinfo(). This reduces code size
while providing more flexibility and efficiency (less device-mapper ioctls).
Also, cleanup attributes are used consistently in the libdevmapper-related code.
glibc policy for reserved names.
For backward compatibility reasons, the exported functions from
libmpathcmd
and
libmpathpersist
that start with double underscore are kept as weaksymbols. Fixes #91.
Bug fixes
(bug introduced in 0.9.8).
deferred_remove
(bug introduced in0.9.9).
key doesn't match: 0x0" when
reservation_key
was configured in themultipaths section of
multipath.conf
(Fixes #92).
multipath -t
andmultipath -T
for the optionsforce_sync
andretrigger_tries
.(Fixes #88)
add map $WWID
).Other
This should improve compatibility e.g. with NixOS.
state.
-fexceptions
during compilation to make sure cleanup code is executedwhen threads are cancelled
weak
attribute forget_multipath_config()
andput_multipath_config()
in order to enable linking with-Bsymbolic-non-weak-functions
(Fixes #86).
(Fixes #93).
(Fixes #87).
Shortlog
@bmarzins (44):
@Cav4ever (2):
@mwilck (109):
@xosevp (5):
@0n-s (1):
@Spybull (1):