On Tue, Mar 13, 2018 at 14:23:22 +0000, Daniel P. Berrangé wrote:
> On Tue, Mar 13, 2018 at 02:07:08PM +0000, Jonathan Davies wrote:
> > If qemuDomainWaitForDeviceRemoval times out, it returns 0. In this
> > instance, if qemuDomainDetachNetDevice returns 0, virsh detach-interface
> > reports:
> > 
> >   Interface detached successfully
> If anything needs changing it is this message from virsh.
> Virsh should not assume return value of 0 means the device has been
> detached. Virsh should do what the API docs suggest and check the
> XML config to see if the asynchronous detach requets has completed
> or not. IOW, it should report either
>  Interface detached successfully
> or
>  Interface detach request still pending

Yeah, it's been on my nice-to-have todo list for a long time now.
Unfortunately, virsh doesn't know what device (i.e., its alias) is going
to be removed based on the XML passed by a user. I was thinking about
adding a new public API which would accept a device XML and return the
matching full device XML from domain definition to help virsh with this
task, but I was too lazy^Wbusy.


libvir-list mailing list

Reply via email to