Bug 1174569 - guest cannot start with a shareable hostdev network iscsi device
Summary: guest cannot start with a shareable hostdev network iscsi device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-16 03:16 UTC by Luyao Huang
Modified: 2015-11-19 05:59 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:59:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2014-12-16 03:16:18 UTC
description of problem:
guest cannot start with a shareable hostdev network iscsi device

Version-Release number of selected component (if applicable):
libvirt-1.2.8-10.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1.prepare a guest have a shareable hostdev network iscsi device
<hostdev mode='subsystem' type='scsi' managed='no'>
      <source protocol='iscsi' name='iqn.2014-11.com.lhuang:tgt1/2'>
        <host name='test1' port='3260'/>
      </source>
      <readonly/>
      <shareable/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </hostdev>

2.start the guest
# virsh start test4
error: Failed to start domain test4
error: internal error: Cannot parse adapter 'iqn.2014-11.com.lhuang:tgt1/2'

Actual results:
cannot start
      
Expected results:
can start


Additional info:

Comment 1 Michal Privoznik 2014-12-17 10:32:37 UTC
I've just pushed the patch upstream:

commit dddd83273538d0248cc16aecab012169d6552341
Author:     Luyao Huang <lhuang@redhat.com>
AuthorDate: Tue Dec 16 11:16:58 2014 +0800
Commit:     Michal Privoznik <mprivozn@redhat.com>
CommitDate: Wed Dec 17 11:23:00 2014 +0100

    conf: fix cannot start a guest have a shareable network iscsi hostdev
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1174569
    
    There's nothing we need to do for shared iSCSI devices in
    qemuAddSharedHostdev and qemuRemoveSharedHostdev. The iSCSI layer
    takes care about that for us.
    
    Signed-off-by: Luyao Huang <lhuang@redhat.com>
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

v1.2.11-53-gdddd832

Comment 2 yisun 2015-04-01 14:52:56 UTC
VERIFIED


Versions:
libvirt-1.2.13-1.el7.x86_64

steps:
1. discover a iscsi lun disk
# iscsiadm --mode discovery --type sendtargets --portal 10.xx.yy.zz  (ip hidden)
10.xx.yy.zz:3260,1 www.lento.com:sunyi1 

2. start a vm with above iscsi disk
    <hostdev mode='subsystem' type='scsi' managed='no'>
      <source protocol='iscsi' name='www.lento.com:sunyi1/1'>
        <host name='10.xx.yy.zz' port='3260'/>
      </source>
      <readonly/>
      <shareable/>
      <alias name='hostdev0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </hostdev>

  # virsh start rhel7.0
Domain rhel7.0 started

3. in guest os, check the iscsi disk really attached. 
root@guest # fdisk -l 
...
Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
...

Comment 4 errata-xmlrpc 2015-11-19 05:59: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://rhn.redhat.com/errata/RHBA-2015-2202.html


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