Bug 614777

Summary: virsh detach-device doesn't support scsi device hot unplugged
Product: Red Hat Enterprise Linux 6 Reporter: Alex Jia <ajia>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED CANTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dallan, dyuan, eblake, jyang, kolsur, llim, ltroan, rdassen, snagar, xen-maint, yimwang
Target Milestone: rcKeywords: FutureFeature, Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-17 11:23:44 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:    
Bug Blocks: 698812, 643456, 655920, 659725    

Description Alex Jia 2010-07-15 09:15:00 UTC
Description of problem:
virsh detach-device operation can hotplug device to guest, including bus=scsi and virtio, but it doesn't support scsi device hot-unplug, virio device is supported.

Version-Release number of selected component (if applicable):

# lsb_release -a
LSB Version:	:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:	RedHatEnterprise
Description:	Red Hat Enterprise Linux release 6.0 Beta (Santiago)
Release:	6.0
Codename:	Santiago

# uname -a
Linux dhcp-66-70-62.nay.redhat.com 2.6.32-37.el6.x86_64 #1 SMP Sun Jun 20 19:29:35 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

# rpm -q libvirt
libvirt-0.8.1-15.el6.x86_64

# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.95.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.create raw or qcow2 type disk image
2.edit disk xml file
3.virsh attach-device guestname disk.xml
4.check attachment result
5.virsh detach-device guestname disk.xml
  
Actual results:
# virsh detach-device rhel6 kvm-disk1.xml 
error: Failed to detach device from kvm-disk1.xml
error: this function is not supported by the connection driver: This type of device cannot be hot unplugged


Expected results:
support scsi device hot-unplug


Additional info:
# cat kvm-disk1.xml 
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/foo.${type}'/>
      <target dev='sdb' bus='scsi'/>
    </disk>

# cat kvm-disk2.xml 
    <disk type='file' device='disk'>
      <source file='/var/lib/libvirt/images/foo.${type}'/>
      <target dev='vdc' bus='virtio'/>
    </disk>

Note: the type includes raw and qcow2

# virsh attach-device rhel6 kvm-disk1.xml 
Device attached successfully

# virsh detach-device rhel6 kvm-disk1.xml 
error: Failed to detach device from kvm-disk1.xml
error: this function is not supported by the connection driver: This type of device cannot be hot unplugged

# virsh attach-device rhel6 kvm-disk2.xml 
Device attached successfully

# virsh detach-device rhel6-x86_64 kvm-disk2.xml 
Device detached successfully

Comment 2 RHEL Program Management 2010-07-15 14:17:55 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 Jiri Denemark 2011-01-27 14:33:51 UTC
AFAIK, SCSI is not supported in RHEL-6 qemu anyway, so you shouldn't be able to attach (hot or cold) nor detach SCSI disks at all. Moreover, this has been fixed upstream and taken to 6.1 with the rebase.

I'm closing this as NOTABUG since it's currently not supported by qemu and thus cannot be tested even though libvirt is fixed.

Comment 6 Dave Allan 2011-04-28 17:59:05 UTC
Changing closed reason to CANTFIX.

Comment 7 Suresh Kolsur 2013-04-17 08:39:34 UTC
I am opening this one, just to understand below point.

If SCSI is not supported as one of the controller types, we have a problem with setting timeout, which is predominantly the way we control I/O failures in the due to any faults on the storage/network.

Ex:
/sys/block/devices/sda/<timeout> 

Is there a way or IDE disks on par with the above?

-Suresh Kolsur

Comment 8 Jiri Denemark 2013-04-17 11:23:44 UTC
Random bugs closed 2 years ago are not the right place to ask support questions. Please, contact Red Hat Support.