Bug 1158886 - virDomainDetachDeviceFlags() does not support VIR_DOMAIN_DEVICE_MODIFY_FORCE
Summary: virDomainDetachDeviceFlags() does not support VIR_DOMAIN_DEVICE_MODIFY_FORCE
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-30 12:49 UTC by m.gibula
Modified: 2016-05-02 14:32 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-05-02 14:32:33 UTC
Embargoed:


Attachments (Terms of Use)
make virDomainDetachDeviceFlags() honor VIR_DOMAIN_DEVICE_MODIFY_FORCE (4.96 KB, patch)
2014-10-30 12:49 UTC, m.gibula
no flags Details | Diff

Description m.gibula 2014-10-30 12:49:54 UTC
Created attachment 952106 [details]
make virDomainDetachDeviceFlags() honor VIR_DOMAIN_DEVICE_MODIFY_FORCE

Description of problem:
virDomainDetachDeviceFlags() does not support VIR_DOMAIN_DEVICE_MODIFY_FORCE. This means that there is no way to forcefully detach disk from running domain if it does not respond to ACPI unplug request (other then shutting it down).

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


Steps to Reproduce:
1. Run linux without acpiphp module
2. detach-disk from virsh

Actual results:
Disk stays attached and there is no way to detach it. It is possible to use QEMU command 'drive_del' manually but libvirt won't notice that its disk definitions are incorrect.

Expected results:
Add --force argument to detch-disk and make virDomainDetachDeviceFlags() call drive_del unconditionally if VIR_DOMAIN_DEVICE_MODIFY_FORCE was passed.

Additional info:

Patch proposal attached. Originally against 1.2.6 but applies to 1.2.9 as well.

Comment 1 Cole Robinson 2016-04-10 19:50:02 UTC
Sorry this didn't receive a timely response. Your patch looks okay to me, can you send this libvir-list ?

Comment 2 Cole Robinson 2016-05-02 14:32:33 UTC
This was brought upstream at some point, but it wasn't followed up. Just closing the bug, if you'd like to see this in libvirt.git you need to follow up on libvir-list


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