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 1900522 - mpathpersist does not not change the reservation keys in prkeys file when they key is changed
Summary: mpathpersist does not not change the reservation keys in prkeys file when the...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: device-mapper-multipath
Version: 8.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.0
Assignee: Ben Marzinski
QA Contact: Lin Li
URL:
Whiteboard:
Depends On:
Blocks: 1892576 1898049
TreeView+ depends on / blocked
 
Reported: 2020-11-23 09:35 UTC by Roman Hodain
Modified: 2021-09-06 15:20 UTC (History)
10 users (show)

Fixed In Version: device-mapper-multipath-0.8.4-6.el8
Doc Type: Bug Fix
Doc Text:
Cause: When mpathpersist is configured to use the prkeys file and it changes the reservation key, it did not update the prkeys file. Consequence: When future paths come online, multipathd would attempt to register them with the old reservation key, and fail because it was using the wrong key Fix: mpathpersist now updates the prkeys file when it changes the reservation key Result: multipathd will successfully register the correct key on devices that have had their reservation key changed by mpathpersist.
Clone Of:
Environment:
Last Closed: 2021-05-18 15:06:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Roman Hodain 2020-11-23 09:35:03 UTC
Description of problem:
    mpathpersist does not not change the reservation keys in prkeys file when the  key is changed

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

How reproducible:
100%

Steps to Reproduce:
    1. Register a key 
        # mpathpersist --out --register --param-sark 0xa -d /dev/mapper/3600c0ff00050b9fda179aa5e01000000
        # mpathpersist -i -k  /dev/mapper/3600c0ff00050b9fda179aa5e01000000
          PR generation=0xcfa, 	4 registered reservation keys follow:
            0xa
            0xa
            0xa
            0xa
        # grep 3600c0ff00050b9fda179aa5e01000000 /etc/multipath/prkeys
          0x000000000000000a 3600c0ff00050b9fda179aa5e01000000


    2. Rename the key
        # mpathpersist --out --register --param-rk 0xa --param-sark 0xb -d /dev/mapper/3600c0ff00050b9fda179aa5e01000000
        # mpathpersist -i -k  /dev/mapper/3600c0ff00050b9fda179aa5e01000000
          PR generation=0xcfe, 	4 registered reservation keys follow:
            0xb
            0xb
            0xb
            0xb
        # grep 3600c0ff00050b9fda179aa5e01000000 /etc/multipath/prkeys
          0x000000000000000a 3600c0ff00050b9fda179aa5e01000000


    3 Initiate the reservation
        # mpathpersist --out --reserve --param-rk 0xb --prout-type 5 -d /dev/mapper/3600c0ff00050b9fda179aa5e01000000
          Nov 23 09:30:26 | 3600c0ff00050b9fda179aa5e01000000: configured reservation key doesn't match: 0xa
          PR out: command failed

Actual results:
    The file is not modified and cosequent commands with the new key fails with error:

        Nov 23 09:30:26 | 3600c0ff00050b9fda179aa5e01000000: configured reservation key doesn't match: 0xa
        PR out: command failed


Expected results:
    The file is properly modified 

Additional info:
    This issue affect stacked products like RHV as they provide scsi reservation for the VMs. The Microsoft Windows clusters fail due to this issue.

Comment 2 Ben Marzinski 2020-11-24 02:57:55 UTC
I should have a fix for this shortly.

Comment 6 Ben Marzinski 2020-12-08 04:02:19 UTC
Fixed

Comment 9 Lin Li 2021-01-07 07:54:33 UTC
Verified on device-mapper-multipath-0.8.4-7.el8
1,[root@storageqe-05 SOURCES]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.8.4-7.el8.x86_64
device-mapper-multipath-0.8.4-7.el8.x86_64

2,[root@storageqe-05 SOURCES]# mpathpersist --out --register --param-sark 0xa -d /dev/mapper/360a98000324669436c2b45666c567865
3,[root@storageqe-05 SOURCES]# mpathpersist -i -k  /dev/mapper/360a98000324669436c2b45666c567865  PR generation=0x2c, 	4 registered reservation keys follow:
    0xa
    0xa
    0xa
    0xa

4,[root@storageqe-05 SOURCES]# grep 360a98000324669436c2b45666c567865 /etc/multipath/prkeys
0x000000000000000a 360a98000324669436c2b45666c567865

5,[root@storageqe-05 SOURCES]# mpathpersist --out --register --param-rk 0xa --param-sark 0xb -d /dev/mapper/360a98000324669436c2b45666c567865
6.[root@storageqe-05 SOURCES]# mpathpersist -i -k  /dev/mapper/360a98000324669436c2b45666c567865
  PR generation=0x30, 	4 registered reservation keys follow:
    0xb
    0xb
    0xb
    0xb
7,[root@storageqe-05 SOURCES]# grep 360a98000324669436c2b45666c567865 /etc/multipath/prkeys
0x000000000000000b 360a98000324669436c2b45666c567865  <--------------the reservation keys in prkeys file is changed 

8.[root@storageqe-05 SOURCES]# mpathpersist --out --reserve --param-rk 0xb --prout-type 5 -d /dev/mapper/360a98000324669436c2b45666c567865
<----------------------the command success
9,[root@storageqe-05 SOURCES]# echo $?
0

Comment 14 errata-xmlrpc 2021-05-18 15:06:46 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/RHEA-2021:1685


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