Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1660770 - Cannot list volumes in iscsi pool
Summary: Cannot list volumes in iscsi pool
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Virtualization Maintenance
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-19 08:03 UTC by Han Han
Modified: 2020-02-03 19:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-03 19:42:39 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
libvirtd log (1.19 MB, text/plain)
2018-12-19 08:03 UTC, Han Han
no flags Details

Description Han Han 2018-12-19 08:03:28 UTC
Created attachment 1515509 [details]
libvirtd log

Description of problem:
As subject

Version-Release number of selected component (if applicable):
iscsi-initiator-utils-6.2.0.876-5.gitf3c8e90.el8+7.x86_64
libvirt-4.5.0-16.module+el8+2586+bf759444.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Create a iscsi target like following:
# # targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 1]
  | | o- file ........................................................................ [/var/tmp/file (1.0GiB) write-back activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.lenovo-sr630-05.x8664:sn.ef90f2c22bff ................................................. [TPGs: 1]
  |   o- tpg1 .................................................................................................. [gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 0]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun0 ................................................................. [fileio/file (/var/tmp/file) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]

2. Create a iscsi pool with the target above:
# cat /tmp/iscsi.xml 
<pool type='iscsi'>
  <name>blockcopy_pool</name>
  <capacity unit='bytes'>0</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>0</available>
  <source>
    <host name='127.0.0.1' port='3260'/>
    <device path='iqn.2003-01.org.linux-iscsi.lenovo-sr630-05.x8664:sn.ef90f2c22bff'/>
  </source>
  <target>
    <path>/dev/disk/by-path</path>
  </target>
</pool>

# virsh pool-create /tmp/iscsi.xml                         
Pool blockcopy_pool created from /tmp/iscsi.xml

3. List the volume in pool:
# virsh vol-list blockcopy_pool                       
 Name                 Path                                                                                     
------------------------------------------------------------------------------
                                                                           


Actual results:
As subject

Expected results:
Vols should be listed

Additional info:
1. See the libvirtd.log in attachment
2. The bugs is not reproduced on:
iscsi-initiator-utils-6.2.0.874-10.el7.x86_64
libvirt-4.5.0-10.el7_6.3.x86_64

iscsi-initiator-utils-6.2.0.876-5.gitf3c8e90.el8+7.x86_64
libvirt-4.10.0-1.module+el8+2317+367e35b5.x86_64

3. It blocks several tp-libvirt cases.

Comment 1 Ján Tomko 2020-02-03 19:42:39 UTC
Probably fixed by:
commit 2e5ad5881bbe7fa4547d4d116d104e6e6c7dce64
    virISCSIScanTargets: Honour iSCSI interface
    
    When scanning for targets, iSCSI might give different results
    depending on the interface used. This is basically just name of
    config file under /etc/iscsi/ifaces to use. The file contains
    initiator IQN thus different results claim.    

commit adfcbdff91767890a60b2034c604ad3e0c58c51b
    virISCSIScanTargets: Allow making targets persistent
    
    After a new iSCSI interface is successfully set up, we issue a
    sendtargets command. However, after 56057900dc53df490d we don't
    update the host config which in turn makes login fail because
    iscsiadm is unable to find any matching record for the interface.

git describe: v4.5.0-277-gadfcbdff91 contains: v4.6.0-rc1~80


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