Bug 1426544

Summary: iscsid seems not to handle S3-PR (SCSI-3 Persistent reservation) correctly.
Product: Red Hat Enterprise Linux 7 Reporter: Martin Tessun <mtessun>
Component: iscsi-initiator-utilsAssignee: Chris Leech <cleech>
Status: CLOSED NOTABUG QA Contact: Martin Hoyer <mhoyer>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: agrover, ailan, coli, knoel, lijin, mchristi, mhoyer, michen, mtessun, pbonzini, phou, vrozenfe, xfu, xuwei, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-03 09:40:05 UTC Type: Bug
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:    
Bug Blocks: 1111784    

Description Martin Tessun 2017-02-24 09:03:32 UTC
Description of problem:
For the Windows Clustering support in RHV we need S3-PR support.
According to our tests, it looks like iscsid is not handling this as expected.

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.873-35.el7.x86_64

How reproducible:
always


Steps to Reproduce:
Install Windows in two VMs exposing a disk that is connected via iscsid to the host. Run the MSCS tests and use the exposed disk as Quorum.

Actual results:
Tests fail:
<SNIP from Validation%20Report%202017.01.30%20At%2012.06.37.htm#47>
Validating Test Disk 0 for Persistent Reservation support.

Issuing Persistent Reservation REGISTER AND IGNORE EXISTING for Test Disk 0 from node vm2-w2k16-2.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.

Issuing call to Persistent Reservation RESERVE on Test Disk 0 from node vm2-w2k16-2.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.

Issuing Persistent Reservation READ RESERVATION on Test Disk 0 from node vm2-w2k16-2.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.

Issuing Persistent Reservation REGISTER AND IGNORE EXISTING for Test Disk 0 from node vm2-w2k16-1.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.

Issuing call to Persistent Reservation RESERVE on Test Disk 0 from node vm2-w2k16-1.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.

Node vm2-w2k16-1.ad-w2k12r2.rhev.lab.eng.brq.redhat.com successfully issued call to Persistent Reservation RESERVE for Test Disk 0 which is currently reserved by node vm2-w2k16-2.ad-w2k12r2.rhev.lab.eng.brq.redhat.com.
This call is expected to fail.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<SNIP>

Expected results:
Tests should pass


Additional info:
See also
https://bugzilla.redhat.com/show_bug.cgi?id=1111784#c68
https://bugzilla.redhat.com/show_bug.cgi?id=1111784#c89 ff.
esp. https://bugzilla.redhat.com/show_bug.cgi?id=1111784#c94

Comment 1 Chris Leech 2017-02-27 17:00:49 UTC
Who can I arrange a conversation with to ensure I'm understanding the storage topology here?  I'm concerned that if there's a single session from VM-host to iSCSI target, then how is the target expected to distinguish between the VM users to make persistent reservations work?

I want to make sure I'm clear on things before going to deep into getting a setup for reproduction and investigation, especially as RHEV and Windows are not things I deal with often.

Comment 2 Chris Leech 2017-02-27 17:40:53 UTC
I have doubts about this being the component at fault, iscsid manages the transport session but doesn't impact SCSI protocol commands directly.  But I'll keep it as is until we get a better idea of exactly what's going on.

Comment 3 Chris Leech 2017-02-28 00:02:27 UTC
Things I would want to see from a failing setup.

1) Generated iSCSI configuration; a copy of everything in /var/lib/iscsi + dump of active session information (iscsiadm -m session -P3) from the host system

2) libvirt XML dumps of the configuration from one or more VMs

3) Any PR information from the target we can get, specifically I'd like to verify that the target is even seeing multiple registrations or if the VMs all look like a single initiator.

For an LIO target setup I'd like the contents of 
/sys/kernel/config/target/core/<iblock? backstore>/<user assigned LU name>/pr/
with res_pr_registered_i_pts being the first value I'd want to look at.