Re: [libvirt] any better way to treat device-detach timeout ?

2016-03-11 Thread Jiri Denemark
On Fri, Mar 11, 2016 at 09:26:23 +, Zhangbo (Oscar) wrote: > After rethinking, I guess there's still a problem: > >Suggest that >1 the device got detached in qemu after 10 secs, >2 the func virDomainDetachDeviceFlags() has already returned success in > the 5th second. Libvirt won

Re: [libvirt] any better way to treat device-detach timeout ?

2016-03-11 Thread Zhangbo (Oscar)
After rethinking, I guess there's still a problem: Suggest that 1 the device got detached in qemu after 10 secs, 2 the func virDomainDetachDeviceFlags() has already returned success in the 5th second. Libvirt won't wait for the DEVICE_DELETED event after then. 3 the 'def' has the dev

Re: [libvirt] any better way to treat device-detach timeout ?

2016-03-11 Thread Zhangbo (Oscar)
> >On Fri, Mar 11, 2016 at 07:40:54 +, Zhangbo (Oscar) wrote: >> Hi,all: >> >>I find that we remove devices only after DEVICE_DELETED >event.(patch:3fbf78bd). >>And it treats TIMEOUT as success. The detailed codes are shown as >below: >> rc = qemuDomainWaitForDeviceRemoval(vm);

Re: [libvirt] any better way to treat device-detach timeout ?

2016-03-10 Thread Jiri Denemark
On Fri, Mar 11, 2016 at 07:40:54 +, Zhangbo (Oscar) wrote: > Hi,all: > >I find that we remove devices only after DEVICE_DELETED > event.(patch:3fbf78bd). >And it treats TIMEOUT as success. The detailed codes are shown as below: > rc = qemuDomainWaitForDeviceRemoval(vm); >

[libvirt] any better way to treat device-detach timeout ?

2016-03-10 Thread Zhangbo (Oscar)
Hi,all: I find that we remove devices only after DEVICE_DELETED event.(patch:3fbf78bd). And it treats TIMEOUT as success. The detailed codes are shown as below: rc = qemuDomainWaitForDeviceRemoval(vm); if (rc == 0 || rc == 1) ret = qemuDomainRemoveDiskDevice(driver