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 1714506 - 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 7
Classification: Red Hat
Component: device-mapper-multipath
Version: 7.0
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
: 7.8
Assignee: Ben Marzinski
QA Contact: Lin Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-28 09:36 UTC by Nakkeeran
Modified: 2021-09-03 12:08 UTC (History)
10 users (show)

Fixed In Version: device-mapper-multipath-0.4.9-131.el7
Doc Type: Bug Fix
Doc Text:
Cause: mpathpersist was not returning an error, even when there were no usable paths for changing the reservations Consequence: mpathpersist was returning success, while failing to change reservations when there were no usable paths Fix: mpathpersist now returns an error when there are no usable paths for changing the reservations. Result: mpathpersist will now correctly return a failure when it can't change the reservations because there are no usable paths.
Clone Of:
Environment:
Last Closed: 2020-03-31 19:47:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1066 0 None None None 2020-03-31 19:47:31 UTC

Description Nakkeeran 2019-05-28 09:36:54 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Kamil Dudka 2019-05-28 11:41:55 UTC
Please fill in the below template.  It is there for a reason.

(In reply to Nakkeeran from comment #0)
> Description of problem:
> 
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 1.
> 2.
> 3.
> 
> Actual results:
> 
> 
> Expected results:
> 
> 
> Additional info:

Comment 3 Nakkeeran 2019-05-28 17:21:32 UTC
I Appologize for not summiting  the appropriate logs. Actually I have specified in the above format, not sure how that was missed during summision.

Here is the log,

Description of problem:

Mpathpersist returns 0 eventhough command doesn't run successfully.

Version-Release number of selected component (if applicable):
7.4

How reproducible:
Always

Steps to Reproduce:
1.[root@gate1 ~]# mpathpersist --out -C --param-rk=fb810001 /dev/mapper/360002ac0000000000000080d0001daxx

May 28 05:29:48 | /etc/multipath.conf does not exist, blacklisting all devices.
May 28 05:29:48 | A default multipath.conf file is located at
May 28 05:29:48 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
May 28 05:29:48 | You can run /sbin/mpathconf --enable to create
May 28 05:29:48 | /etc/multipath.conf. See man mpathconf(8) for more details

2.echo $?

3. Returns 0 but keys are not cleared.

Actual results:

Returns 0 eventhough keys were not cleared.

Expected results:

should not return 0 

Additional info:

Comment 4 Nakkeeran 2019-06-03 11:59:23 UTC
Additional info : 
I have removed /etc/multipath.conf file before running mpathpersist command

Comment 5 Ben Marzinski 2019-06-12 20:51:55 UTC
Are you sure that it didn't clear the keys. Just because it returns those warning messages doesn't mean it didn't work.  When I try this, it successfully removes the keys, even with the warning messages.  If I give an invalid reservation key, it prints an additional error message, and returns a non-zero value correctly.

Comment 6 Nakkeeran 2019-06-13 05:43:02 UTC





Yes, Keys were not cleared. Please find the logs below.


[root@gateway1 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.4.9-123.el7.x86_64
device-mapper-multipath-0.4.9-123.el7.x86_64
[root@gateway1 ~]#


1)
[root@gateway1 ~]# mpathpersist -i -k /dev/mapper/mpathe
  PR generation=0x3b,   2 registered reservation keys follow:
    0x98010001
    0x98010001

2) 

[root@gateway1 ~]# mv /etc/multipath.conf /
mv: overwrite ‘/multipath.conf’? y



3) Clearing keys multipath.conf is not there


[root@gateway1 ~]# mpathpersist --out -C --param-rk=98010001 /dev/mapper/mpathe
Jun 13 01:37:57 | /etc/multipath.conf does not exist, blacklisting all devices.
Jun 13 01:37:57 | A default multipath.conf file is located at
Jun 13 01:37:57 | /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf
Jun 13 01:37:57 | You can run /sbin/mpathconf --enable to create
Jun 13 01:37:57 | /etc/multipath.conf. See man mpathconf(8) for more details


4) Returns 0 Though it fails to clear
[root@gateway1 ~]# echo $?
0


5) read keys

[root@gateway1 ~]# cp /multipath.conf /etc/multipath.conf
[root@gateway1 ~]# mpathpersist -i -k /dev/mapper/mpathe
  PR generation=0x3b,   2 registered reservation keys follow:
    0x98010001
    0x98010001

Comment 7 Ben Marzinski 2019-08-12 21:13:30 UTC
mpathpersist will now skip blacklisted paths.

Comment 18 errata-xmlrpc 2020-03-31 19:47:09 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, 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-2020:1066


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