RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1984723 - Mpathpersist returns 0 eventhough command doesn't run successfully.
Summary: Mpathpersist returns 0 eventhough command doesn't run successfully.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: device-mapper-multipath
Version: 8.5
Hardware: ppc64le
OS: Linux
medium
high
Target Milestone: beta
: ---
Assignee: Ben Marzinski
QA Contact: Lin Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-22 02:25 UTC by Lin Li
Modified: 2021-11-10 07:10 UTC (History)
6 users (show)

Fixed In Version: device-mapper-multipath-0.8.4-17.el8
Doc Type: Bug Fix
Doc Text:
Cause: some mpathpersist commands were returning success if they did not work, since there were no good paths to use. Consequence: mpathpersist could return success, even though the command faled Fix: mpathpersist now returns failure if there were no usable paths. Result: mpathpersist will now correctly return failure in cases where a command failed because there were no usable paths.
Clone Of:
Environment:
Last Closed: 2021-11-09 19:32:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4367 0 None None None 2021-11-09 19:32:15 UTC

Description Lin Li 2021-07-22 02:25:45 UTC
Description of problem:
Mpathpersist returns 0 eventhough command doesn't run successfully.

Version-Release number of selected component (if applicable):
device-mapper-multipath-0.8.4-14.el8.ppc64le

How reproducible:
always

Steps to Reproduce:
1.[root@ibm-p9z-20-lp15 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.8.4-14.el8.ppc64le
device-mapper-multipath-0.8.4-14.el8.ppc64le

2.[root@ibm-p9z-20-lp15 ~]# multipath -ll
mpatha (3600601605e203f008e22d0221f07eb11) dm-0 DGC,VRAID
size=8.0G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=10 status=enabled
| |- 1:0:0:0 sda 8:0  active ready running
| `- 2:0:0:0 sdc 8:32 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  |- 1:0:1:0 sdb 8:16 active ready running
  `- 2:0:1:0 sdd 8:48 active ready running

3.[root@ibm-p9z-20-lp15 ~]# mpathpersist -i -k /dev/mapper/mpatha
  PR generation=0x0, 	0 registered reservation key.

4.[root@ibm-p9z-20-lp15 ~]# mv /etc/multipath.conf /

5.[root@ibm-p9z-20-lp15 ~]# mpathpersist --out -C --param-rk=0 /dev/mapper/mpatha
Jul 21 22:18:12 | /etc/multipath.conf does not exist, blacklisting all devices.
Jul 21 22:18:12 | You can run "/sbin/mpathconf --enable" to create
Jul 21 22:18:12 | /etc/multipath.conf. See man mpathconf(8) for more details

6.[root@ibm-p9z-20-lp15 ~]# echo $?
0  <-----------------------


Actual results:
Mpathpersist returns 0 when command doesn't run successfully

Expected results:
Mpathpersist returns a failure when command doesn't run successfully

Additional info:

Comment 4 Lin Li 2021-07-29 01:53:08 UTC
Verified on device-mapper-multipath-0.8.4-17.el8
1,[root@ibm-p9z-20-lp13 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.8.4-17.el8.ppc64le
device-mapper-multipath-0.8.4-17.el8.ppc64le

2,[root@ibm-p9z-20-lp13 ~]# multipath -ll
mpatha (3600601605e203f00d6ed8ff61e07eb11) dm-0 DGC,VRAID
size=8.0G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=10 status=enabled
| |- 1:0:0:0 sda 8:0  active ready running
| `- 2:0:0:0 sdc 8:32 active ready running
`-+- policy='service-time 0' prio=50 status=enabled
  |- 1:0:1:0 sdb 8:16 active ready running
  `- 2:0:1:0 sdd 8:48 active ready running
 
3,[root@ibm-p9z-20-lp13 ~]# mpathpersist -i -k /dev/mapper/mpatha
  PR generation=0x0, 	0 registered reservation key.

4,[root@ibm-p9z-20-lp13 ~]# mv /etc/multipath.conf /
[root@ibm-p9z-20-lp13 ~]# mpathpersist --out -C --param-rk=0 /dev/mapper/mpatha
Jul 28 21:51:11 | /etc/multipath.conf does not exist, blacklisting all devices.
Jul 28 21:51:11 | You can run "/sbin/mpathconf --enable" to create
Jul 28 21:51:11 | /etc/multipath.conf. See man mpathconf(8) for more details
Jul 28 21:51:11 | 3600601605e203f00d6ed8ff61e07eb11: no path available
PR out: command failed

5,[root@ibm-p9z-20-lp13 ~]# echo $?
13

Comment 7 errata-xmlrpc 2021-11-09 19:32:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (device-mapper-multipath bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4367


Note You need to log in before you can comment on or make changes to this bug.