Bug 499669

Summary: libvirt QEMU driver is using old pci_add/pci_del syntax
Product: [Fedora] Fedora Reporter: Marcelo Tosatti <mtosatti>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 11CC: berrange, clalance, crobinso, hbrock, itamar, markmc, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.6.2-14.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 502095 (view as bug list) Environment:
Last Closed: 2009-08-15 08:30:28 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: 480594    

Description Marcelo Tosatti 2009-05-07 15:30:12 UTC
Description of problem:

Hot-removing a virtio-blk device succeeds even if the guest did not remove
it, because device was in use. 

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

Fedora 11 Preview

How reproducible:

Always

Steps to Reproduce:
1. Add a virtio-blk device
2. Mount it on the guest, grab a reference to the device
3. Hot remove it in virt-manager
  
Actual results:

The icon for the disk disappears in virt-manager, even though the guest
did not successfully removed it. Perhaps its not checking the return value from 
pci_del properly? Or pci_del response is wrong for some reason.

Expected results:

Should display "cannot remove device from guest", which does happen if you attempt to remove for example vda where the guest root filesystem is mounted.

Additional info:

Comment 1 Marcelo Tosatti 2009-05-07 15:36:03 UTC
Hum, maybe this is not a virt-manager fault. The device is dead on the guest (trying to umount it hangs forever). But the pci device is there, so the guest did not ack the ACPI removal event.

Comment 2 Marcelo Tosatti 2009-05-08 14:15:56 UTC
Actually, it was working with kvm-74 installed. After the upgrade to the new 
qemu packages in FC11 PCI hot-add broke:

pci_add 0 storage file=/tmp/file10,if=scsi
Invalid pci address^
info balloon

Which is the old syntax for pci_add.

Comment 3 Mark McLoughlin 2009-05-11 11:27:02 UTC
(In reply to comment #2)
> Actually, it was working with kvm-74 installed. After the upgrade to the new 
> qemu packages in FC11 PCI hot-add broke:
> 
> pci_add 0 storage file=/tmp/file10,if=scsi
> Invalid pci address^
> info balloon
> 
> Which is the old syntax for pci_add.  

This sounds like a different bug - could you file it separately? Sounds like libvirt needs code for the new syntax

Comment 4 Marcelo Tosatti 2009-05-11 18:37:30 UTC
Mark,

I'll retest the original issue once virt-manager is talking the new syntax, 
and open a new bug in case its still problematic.

Comment 5 Bug Zapper 2009-06-09 15:22:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Daniel Berrangé 2009-08-04 15:18:35 UTC
Fixed upstream

http://libvirt.org/git/?p=libvirt.git;a=commit;h=326ecb78145cfeb7706ef0dcd521b19d934950e7

commit 326ecb78145cfeb7706ef0dcd521b19d934950e7
Author: Daniel P. Berrange <berrange>
Date:   Mon Jul 6 15:58:55 2009 +0100

    Fix PCI device hotplug/unplug with newer QEMU
    
    * src/qemu_driver.c: Try new monitor syntax for hotplug first. If
      that fails fallback to old KVM specific syntax

Comment 7 Daniel Berrangé 2009-08-05 16:08:10 UTC
Built fix into libvirt-0.6.2-14.fc11

Comment 8 Fedora Update System 2009-08-05 16:12:56 UTC
libvirt-0.6.2-14.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/libvirt-0.6.2-14.fc11

Comment 9 Fedora Update System 2009-08-07 05:00:38 UTC
libvirt-0.6.2-14.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libvirt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8333

Comment 10 Fedora Update System 2009-08-15 08:29:58 UTC
libvirt-0.6.2-14.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.