This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

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 04:30:28 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 480594    

Description Marcelo Tosatti 2009-05-07 11:30:12 EDT
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 11:36:03 EDT
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 10:15:56 EDT
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 07:27:02 EDT
(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 14:37:30 EDT
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 11:22:21 EDT
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 Berrange 2009-08-04 11:18:35 EDT
Fixed upstream

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

commit 326ecb78145cfeb7706ef0dcd521b19d934950e7
Author: Daniel P. Berrange <berrange@redhat.com>
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 Berrange 2009-08-05 12:08:10 EDT
Built fix into libvirt-0.6.2-14.fc11
Comment 8 Fedora Update System 2009-08-05 12:12:56 EDT
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 01:00:38 EDT
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 04:29:58 EDT
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.