Bug 694438 - Hotplug the disk without --persistent and shut down guest, disk still exist.
Summary: Hotplug the disk without --persistent and shut down guest, disk still exist.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.7
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Osier Yang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-07 11:13 UTC by weizhang
Modified: 2011-08-15 20:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-15 20:05:40 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description weizhang 2011-04-07 11:13:56 UTC
Description of problem:
I hotplug a disk without --persistent and shutdown guest, the disk still exists. For kvm guest only.

Version-Release number of selected component (if applicable):
kernel-2.6.18-238.el5
kvm-83-229.el5
libvirt-0.8.2-18.el5
kvm-qemu-img-83-229.el5

How reproducible:
100%

Steps to Reproduce:
1. virsh start vr-rhel5u6-x86_64-kvm
2. virsh attach-disk vr-rhel5u6-x86_64-kvm /dev/sda2 vdb --sourcetype block --driver qemu --subdriver raw
3. virsh shutdown vr-rhel5u6-x86_64-kvm
4. check the xml
...
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sda2'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
...
5. start vr-rhel5u6-x86_64-kvm and check
  
Actual results:
disk still exist

Expected results:
hotplugged disk will disappear after shutdown guest

Additional info:

Comment 1 Osier Yang 2011-04-18 01:15:15 UTC
Kyla, could you restart libvirtd then check if the disk still exsits? if it doesn't exist anymore, it's not a bug, anoter way is to check if the disk exists in persistent xml after hotplug, (/etc/libvirt/qemu/$guest.xml), if it doesn't exist, it's not a bug.

"--persistent" change means changing the persistent xml (stores on disk).

Comment 2 weizhang 2011-04-21 07:35:29 UTC
(In reply to comment #1)
> Kyla, could you restart libvirtd then check if the disk still exsits? if it
> doesn't exist anymore, it's not a bug, anoter way is to check if the disk
> exists in persistent xml after hotplug, (/etc/libvirt/qemu/$guest.xml), if it
> doesn't exist, it's not a bug.
> 
> "--persistent" change means changing the persistent xml (stores on disk).

I don't use --persistent , so after shutdown and restart the guest, it should be removed even if I do not restart libvirtd.

Comment 4 Huming Jiang 2011-06-01 10:19:17 UTC
Could reproduce this bug on the following components of rh5.6:
libvirt-0.8.2-15.el5
kernel-2.6.18-238.el5
kvm-83-224.el5
kvm-qemu-img-83-224.el5

Steps to Reproduce:
1. virsh start rh5
2. virsh attach-disk rh5 /dev/sda2 vdb --sourcetype block --driver qemu --subdriver raw
3. virsh dumpxml rh5
...
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sda2'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
...
3. virsh shutdown rh5
4. check the xml
...
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sda2'/>
      <target dev='vdb' bus='virtio'/>
    </disk>
...
5. start vr-rhel5u6-x86_64-kvm and check
#virsh dumpxml rh5
...
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sda2'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
...

Comment 5 RHEL Program Management 2011-06-20 22:39:00 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.7 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 7 RHEL Program Management 2011-08-15 20:05:40 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.


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