While dettaching/attaching device in OpenStack, nova
calls vzDomainDettachDevice twice, because the update of the internal
configuration of the ct comes a bit latter than the update event.
As the result, we suffer from the second call to dettach the same device.
Signed-off-by: Olga Krishtal <okrishtal@virtuozzo.com>
if (prlsdkAttachDevice(driver, dom, dev) < 0)
goto cleanup;
+ if (prlsdkUpdateDomain(driver, dom) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);
if (prlsdkDetachDevice(driver, dom, dev) < 0)
goto cleanup;
+ if (prlsdkUpdateDomain(driver, dom) < 0)
+ goto cleanup;
+
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);