On Tue, Mar 13, 2018 at 14:07:08 +0000, Jonathan Davies wrote:
> qemuDomainDetachNetDevice should not treat a timeout in a call to
> qemuDomainWaitForDeviceRemoval as success. Instead, it should treat it
> as failure -- this is the intention behind having a timeout.
> If qemuDomainWaitForDeviceRemoval times out, it returns 0. In this
> instance, if qemuDomainDetachNetDevice returns 0, virsh detach-interface
> reports:
>   Interface detached successfully
> with a zero exit status.
> But with a negative return value from qemuDomainDetachNetDevice, virsh
> detach-interface reports:
>   error: Failed to detach interface
>   error: An error occurred, but the cause is unknown
> with a non-zero exit status, which is more appropriate.
> Signed-off-by: Jonathan Davies <jonathan.dav...@nutanix.com>
> ---

This is unfortunately pre-existing behavior that we can't change. Some
versions of qemu don't support reporting of successful detach using the
event infrastructure, thus we can't ever know when that was successful.

Applications which need to be sure that the device was detached need to
register handlers for the libvirt device detached event.

NACK, this is broken behavior, but can't be changed.

Attachment: signature.asc
Description: PGP signature

libvir-list mailing list

Reply via email to