2cf40b2f98
- Add 0073-libmultipath-util-constify-function-arguments.patch - Add 0074-libmultipath-constify-file-argument-in-config-parser.patch - Add 0075-libmultipath-provide-defaults-for-get-put-_multipath.patch - Add 0076-libmpathpersist-allow-using-libmultipath-get-put-_mu.patch - Add 0077-multipath-use-get_put-_multipath_config-from-libmult.patch - Add 0078-mpathpersist-use-get-put-_multipath_config-from-libm.patch - Add 0079-libmultipath-add-udev-and-logsink-symbols.patch - Add 0080-multipath-remove-logsink-and-udev.patch - Add 0081-libmpathpersist-call-libmultipath_-init-exit.patch - Add 0082-mpathpersist-remove-logsink-and-udev.patch - Add 0083-multipathd-remove-logsink-and-udev.patch * Pull in upsteam library changes - Add 0084-libmpathvalid-use-default-_multipath_config-udev-and.patch - Add 0085-Revert-libmultipath-add-ignore_udev_uid-option.patch - Add 0086-libmultipath-change-log-level-for-null-uid_attribute.patch - Add 0087-libmultipath-orphan_paths-avoid-BUG-message.patch * update libmpathvalid to use upstream library changes. changes submitted upstream
187 lines
6.2 KiB
Diff
187 lines
6.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Sat, 26 Sep 2020 23:26:32 -0500
|
|
Subject: [PATCH] Revert "libmultipath: add ignore_udev_uid option"
|
|
|
|
This reverts commit f1350bc5c4aa445804f3f4fc8968fb46d581336e.
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmultipath/config.h | 1 -
|
|
libmultipath/dict.c | 4 ----
|
|
libmultipath/discovery.c | 17 ++++++-----------
|
|
libmultipath/discovery.h | 8 +-------
|
|
libmultipath/uevent.c | 2 +-
|
|
multipath/multipath.conf.5 | 13 -------------
|
|
multipathd/main.c | 7 +------
|
|
7 files changed, 9 insertions(+), 43 deletions(-)
|
|
|
|
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
|
index 089b2ac2..576f15d1 100644
|
|
--- a/libmultipath/config.h
|
|
+++ b/libmultipath/config.h
|
|
@@ -192,7 +192,6 @@ struct config {
|
|
int find_multipaths_timeout;
|
|
int marginal_pathgroups;
|
|
int skip_delegate;
|
|
- int ignore_udev_uid;
|
|
unsigned int version[3];
|
|
unsigned int sequence_nr;
|
|
|
|
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
|
index 9a0729bf..184d4b22 100644
|
|
--- a/libmultipath/dict.c
|
|
+++ b/libmultipath/dict.c
|
|
@@ -1406,9 +1406,6 @@ declare_hw_snprint(all_tg_pt, print_yes_no_undef)
|
|
declare_def_handler(marginal_pathgroups, set_yes_no)
|
|
declare_def_snprint(marginal_pathgroups, print_yes_no)
|
|
|
|
-declare_def_handler(ignore_udev_uid, set_yes_no)
|
|
-declare_def_snprint(ignore_udev_uid, print_yes_no)
|
|
-
|
|
static int
|
|
def_uxsock_timeout_handler(struct config *conf, vector strvec)
|
|
{
|
|
@@ -1819,7 +1816,6 @@ init_keywords(vector keywords)
|
|
install_keyword("enable_foreign", &def_enable_foreign_handler,
|
|
&snprint_def_enable_foreign);
|
|
install_keyword("marginal_pathgroups", &def_marginal_pathgroups_handler, &snprint_def_marginal_pathgroups);
|
|
- install_keyword("ignore_udev_uid", &def_ignore_udev_uid_handler, &snprint_def_ignore_udev_uid);
|
|
__deprecated install_keyword("default_selector", &def_selector_handler, NULL);
|
|
__deprecated install_keyword("default_path_grouping_policy", &def_pgpolicy_handler, NULL);
|
|
__deprecated install_keyword("default_uid_attribute", &def_uid_attribute_handler, NULL);
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
|
index f0e92227..002d3d18 100644
|
|
--- a/libmultipath/discovery.c
|
|
+++ b/libmultipath/discovery.c
|
|
@@ -2010,7 +2010,7 @@ static bool has_uid_fallback(struct path *pp)
|
|
|
|
int
|
|
get_uid (struct path * pp, int path_state, struct udev_device *udev,
|
|
- int fallback)
|
|
+ int allow_fallback)
|
|
{
|
|
char *c;
|
|
const char *origin = "unknown";
|
|
@@ -2043,9 +2043,7 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev,
|
|
} else
|
|
len = strlen(pp->wwid);
|
|
origin = "callout";
|
|
- } else if (fallback == UID_FALLBACK_FORCE)
|
|
- len = uid_fallback(pp, path_state, &origin);
|
|
- else {
|
|
+ } else {
|
|
bool udev_available = udev && pp->uid_attribute
|
|
&& *pp->uid_attribute;
|
|
|
|
@@ -2058,9 +2056,8 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev,
|
|
else
|
|
origin = "udev";
|
|
}
|
|
- if ((!udev_available ||
|
|
- (len <= 0 && fallback == UID_FALLBACK_ALLOW)) &&
|
|
- has_uid_fallback(pp)) {
|
|
+ if ((!udev_available || (len <= 0 && allow_fallback))
|
|
+ && has_uid_fallback(pp)) {
|
|
used_fallback = 1;
|
|
len = uid_fallback(pp, path_state, &origin);
|
|
}
|
|
@@ -2200,10 +2197,8 @@ int pathinfo(struct path *pp, struct config *conf, int mask)
|
|
}
|
|
|
|
if ((mask & DI_WWID) && !strlen(pp->wwid)) {
|
|
- int fallback = conf->ignore_udev_uid? UID_FALLBACK_FORCE :
|
|
- (pp->retriggers >= conf->retrigger_tries)?
|
|
- UID_FALLBACK_ALLOW : UID_FALLBACK_NONE;
|
|
- get_uid(pp, path_state, pp->udev, fallback);
|
|
+ get_uid(pp, path_state, pp->udev,
|
|
+ (pp->retriggers >= conf->retrigger_tries));
|
|
if (!strlen(pp->wwid)) {
|
|
if (pp->bus == SYSFS_BUS_UNDEF)
|
|
return PATHINFO_SKIPPED;
|
|
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
|
|
index ca8542d6..6444887d 100644
|
|
--- a/libmultipath/discovery.h
|
|
+++ b/libmultipath/discovery.h
|
|
@@ -54,14 +54,8 @@ ssize_t sysfs_get_inquiry(struct udev_device *udev,
|
|
unsigned char *buff, size_t len);
|
|
int sysfs_get_asymmetric_access_state(struct path *pp,
|
|
char *buff, int buflen);
|
|
-
|
|
-enum {
|
|
- UID_FALLBACK_NONE,
|
|
- UID_FALLBACK_ALLOW,
|
|
- UID_FALLBACK_FORCE,
|
|
-};
|
|
int get_uid(struct path * pp, int path_state, struct udev_device *udev,
|
|
- int fallback);
|
|
+ int allow_fallback);
|
|
|
|
/*
|
|
* discovery bitmask
|
|
diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c
|
|
index d67129d1..e0d13b11 100644
|
|
--- a/libmultipath/uevent.c
|
|
+++ b/libmultipath/uevent.c
|
|
@@ -179,7 +179,7 @@ uevent_need_merge(void)
|
|
bool need_merge = false;
|
|
|
|
conf = get_multipath_config();
|
|
- if (!conf->ignore_udev_uid && VECTOR_SIZE(&conf->uid_attrs) > 0)
|
|
+ if (VECTOR_SIZE(&conf->uid_attrs) > 0)
|
|
need_merge = true;
|
|
put_multipath_config(conf);
|
|
|
|
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
|
index 175ca095..42a192f6 100644
|
|
--- a/multipath/multipath.conf.5
|
|
+++ b/multipath/multipath.conf.5
|
|
@@ -286,19 +286,6 @@ The default is: \fB<unset>\fR
|
|
.
|
|
.
|
|
.TP
|
|
-.B ignore_udev_uid
|
|
-Setting this option to yes will force multipath to ignore the the uid_attrs
|
|
-and uid_attribute settings, and generate the WWID by the \fIsysfs\fR
|
|
-method. This will cause devices that cannot get their WWID from the standard
|
|
-locations for their device type to not get a WWID; see \fBWWID generation\fR
|
|
-below.
|
|
-.RS
|
|
-.TP
|
|
-The default is: \fBno\fR
|
|
-.RE
|
|
-.
|
|
-.
|
|
-.TP
|
|
.B prio
|
|
The name of the path priority routine. The specified routine
|
|
should return a numeric value specifying the relative priority
|
|
diff --git a/multipathd/main.c b/multipathd/main.c
|
|
index 6a4b8b83..94926b57 100644
|
|
--- a/multipathd/main.c
|
|
+++ b/multipathd/main.c
|
|
@@ -1223,7 +1223,6 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
|
if (pp) {
|
|
struct multipath *mpp = pp->mpp;
|
|
char wwid[WWID_SIZE];
|
|
- int fallback;
|
|
|
|
if (pp->initialized == INIT_REQUESTED_UDEV) {
|
|
needs_reinit = 1;
|
|
@@ -1235,11 +1234,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
|
goto out;
|
|
|
|
strcpy(wwid, pp->wwid);
|
|
- conf = get_multipath_config();
|
|
- fallback = conf->ignore_udev_uid? UID_FALLBACK_FORCE:
|
|
- UID_FALLBACK_NONE;
|
|
- put_multipath_config(conf);
|
|
- rc = get_uid(pp, pp->state, uev->udev, fallback);
|
|
+ rc = get_uid(pp, pp->state, uev->udev, 0);
|
|
|
|
if (rc != 0)
|
|
strcpy(pp->wwid, wwid);
|
|
--
|
|
2.17.2
|
|
|