Bug 1356436
Summary: | cannot pool-create iscsi pool because cannot successfully login iscsi target | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yisun |
Component: | libvirt | Assignee: | John Ferlan <jferlan> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.3 | CC: | dyuan, lmen, rbalakri, xuzhang, yanyang, yisun |
Target Milestone: | rc | Keywords: | Regression |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | libvirt-2.0.0-4.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-11-03 18:48:42 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: |
Description
yisun
2016-07-14 06:34:23 UTC
There's a fine line between declaring this is a bug and testing has taken advantage of the environment knowing about step 2... It's competing requirements with bz 1331552... The simple solution, don't do step2... Not something that libvirt does. Still, I suppose something could be done to do that "-o new" step or determine a way to make things work. As an aside, doing step 2 on a host with a running pool gets: # iscsiadm -m node -o delete iscsiadm: This command will remove the record [iface: default, target: iqn.2013-12.com.example:iscsi-chap-netpool, portal: 192.168.122.1,3260], but a session is using it. Logout session then rerun command to remove record. iscsiadm: Could not execute operation on all records: session exists # (In reply to John Ferlan from comment #2) > There's a fine line between declaring this is a bug and testing has taken > advantage of the environment knowing about step 2... It's competing > requirements with bz 1331552... > > The simple solution, don't do step2... Not something that libvirt does. > Still, I suppose something could be done to do that "-o new" step or > determine a way to make things work. > > As an aside, doing step 2 on a host with a running pool gets: > > # iscsiadm -m node -o delete > iscsiadm: This command will remove the record [iface: default, target: > iqn.2013-12.com.example:iscsi-chap-netpool, portal: 192.168.122.1,3260], but > a session is using it. Logout session then rerun command to remove record. > iscsiadm: Could not execute operation on all records: session exists > # Hi John, When a host has never connected to the iscsi server's targets, we can skip step 2 to reproduce this issue. And this is what I met with a clean test env at first. I put step 2 here because I already connected to the iscsi targets with this host when I wrote the description. So step 2 to make sure the env is "clean". I have posted a couple of patches: http://www.redhat.com/archives/libvir-list/2016-July/msg00633.html which use an alternate means to "discover" the targets. Upstream patches were pushed: $ git describe 5d8c31c6b202aa5ce4329042225bb40fec16baf9 v2.1.0-rc1-11-g5d8c31c $ git show iscsi: Establish connection to target via static target login ... Commit id '56057900' altered the discovery of iSCSI node targets by using the "--op nonpersistent". This caused issues for clean environments or if by chance a "-m node -o delete" was executed. Since each iSCSI Storage Pool has the required iSCSI target path, use that and the virISCSINodeNew API in order to generate the iSCSI node record. Verified on libvirt-2.0.0-4.el7.x86_64 PASSED ===== Scenario 1, pool-create ==== # iscsiadm -m node -o delete # cat pool.iscsi <pool type='iscsi'> <name>iscsi</name> <capacity unit='bytes'>0</capacity> <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> <host name='iscsi.server.ip'/> <device path='iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto'/> </source> <target> <path>/dev/disk/by-path</path> </target> </pool> # virsh pool-create pool.iscsi Pool iscsi created from pool.iscsi # virsh vol-list iscsi Name Path ------------------------------------------------------------------------------ unit:0:0:1 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-1 unit:0:0:2 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-2 unit:0:0:3 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-3 unit:0:0:4 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-4 unit:0:0:5 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-5 # virsh pool-destroy iscsi Pool iscsi destroyed ========Scenario 2, pool-define pool-build pool-start======= # iscsiadm -m node -o delete # virsh pool-define pool.iscsi Pool iscsi defined from pool.iscsi # virsh pool-build iscsi Pool iscsi built # virsh pool-start iscsi Pool iscsi started # virsh vol-list iscsi Name Path ------------------------------------------------------------------------------ unit:0:0:1 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-1 unit:0:0:2 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-2 unit:0:0:3 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-3 unit:0:0:4 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-4 unit:0:0:5 /dev/disk/by-path/ip-10.66.5.88:3260-iscsi-iqn.2014-12.com.redhat:libvirt.shyu-qe-consumption-auto-lun-5 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://rhn.redhat.com/errata/RHSA-2016-2577.html |