Bug 1687715

Summary: different behaviors when create storage pool via NPIV in RHEL7.5 and RHEL7.6 [rhel-7.6.z]
Product: Red Hat Enterprise Linux 7 Reporter: RAD team bot copy to z-stream <autobot-eus-copy>
Component: libvirtAssignee: John Ferlan <jferlan>
Status: CLOSED ERRATA QA Contact: yisun
Severity: medium Docs Contact:
Priority: high    
Version: 7.6CC: gveitmic, hhan, jdenemar, jferlan, lmen, meili, sirao, xingya.xu, xuzhang, yalzhang
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-4.5.0-10.el7_6.7 Doc Type: Bug Fix
Doc Text:
Cause: The algorithm used to manage volumes changed from a linked list to one based on a hash table using keys to lookup volumes. NPIV LUNs share the same serial value used as one of the unique keys. Consequence: The algorithm used to add the volume to the hash table would return a failure since the unique key would already be in use. Fix: Alter the name used to generate the unique key for the NPIV LUN to include the port value for the LUN. Result: All NPIV LUNs can have a unique key for the hash table and will be listed in the storage pool.
Story Points: ---
Clone Of: 1657468 Environment:
Last Closed: 2019-04-23 14:29:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1657468    
Bug Blocks:    

Description RAD team bot copy to z-stream 2019-03-12 08:25:13 UTC
This bug has been copied from bug #1657468 and has been proposed to be backported to 7.6 z-stream (EUS).

Comment 5 yisun 2019-03-28 06:21:18 UTC
We do not have exactly same env as reporter (4 luns pointing to the same backend sotrage), our lab has limitation to have only 2 luns pointing to the same backend storage. But the scenario should be ok to verify this bug.


1. reproduced on libvirt-4.5.0-10.el7.x86_64
[root@ibm-x3250m5-04 ~]# virsh pool-undefine vp
Pool vp has been undefined

[root@ibm-x3250m5-04 ~]# cat pool
<pool type='scsi'>
<name>vp</name>
<source>
<adapter type='fc_host' wwnn='20000000c99e2b80' wwpn='1000000000000009' parent='scsi_host6'/>
</source>
<target>
<path>/dev/disk/by-path</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
[root@ibm-x3250m5-04 ~]# virsh pool-define pool
Pool vp defined from pool

[root@ibm-x3250m5-04 ~]# virsh pool-start vp
Pool vp started

[root@ibm-x3250m5-04 ~]# virsh vol-list vp
Name Path
------------------------------------------------------------------------------
unit:0:0:0 /dev/disk/by-path/pci-0000:20:00.0-vport-0x1000000000000009-fc-0x50050768030939b6-lun-0
<=== only one lun displayed in pool

2. verified on libvirt-4.5.0-10.el7_6.7.x86_64
[root@ibm-x3250m5-04 ~]# cat pool
<pool type='scsi'>
<name>vp</name>
<source>
<adapter type='fc_host' wwnn='20000000c99e2b80' wwpn='1000000000000009' parent='scsi_host6'/>
</source>
<target>
<path>/dev/disk/by-path</path>
<permissions>
<mode>0700</mode>
<owner>0</owner>
<group>0</group>
</permissions>
</target>
</pool>
[root@ibm-x3250m5-04 ~]# virsh pool-define pool
Pool vp defined from pool

[root@ibm-x3250m5-04 ~]# virsh pool-start vp
Pool vp started

[root@ibm-x3250m5-04 ~]# multipath -ll
mpathd (360050763008084e6e0000000000001b4) dm-8 IBM ,2145
size=10G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| `- 17:0:1:0 sdg 8:96 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
`- 17:0:0:0 sdf 8:80 active ready running

[root@ibm-x3250m5-04 ~]# virsh vol-list vp
Name Path
------------------------------------------------------------------------------
unit:0:0:0 /dev/disk/by-path/pci-0000:20:00.0-vport-0x1000000000000009-fc-0x50050768030939b7-lun-0
unit:0:1:0 /dev/disk/by-path/pci-0000:20:00.0-vport-0x1000000000000009-fc-0x50050768030939b6-lun-0
<==== all of the luns displayed as vols in pool



The result is PASSED
I'll cover the risk area by auto testcases of npiv and storage pool. This bug will be set as verified when these jobs finished and no regression issue found. thx

Comment 6 yisun 2019-03-29 05:38:55 UTC
Checked npiv and storage automation jobs and no regression failures, so marked this bz as VERIFIED.

Comment 8 errata-xmlrpc 2019-04-23 14:29:07 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-2019:0821