mirror of https://gitee.com/openkylin/libvirt.git
vz: move prlsdkCleanupBridgedNet after domain deletion
prlsdkCleanupBridgedNet call should be made strongly after any actual domain deletion accurs. By doing this we avoid any potential problems connected with second undefine call when it is made after first one fails by some reason, and we detect that network is already deleted. Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
This commit is contained in:
parent
b733739416
commit
64b3bb7b15
|
@ -3765,8 +3765,6 @@ prlsdkUnregisterDomain(vzConnPtr privconn, virDomainObjPtr dom)
|
|||
PRL_HANDLE job;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < dom->def->nnets; i++)
|
||||
prlsdkCleanupBridgedNet(privconn, dom->def->nets[i]);
|
||||
|
||||
if (prlsdkDetachDomainHardDisks(privdom->sdkdom))
|
||||
return -1;
|
||||
|
@ -3775,6 +3773,9 @@ prlsdkUnregisterDomain(vzConnPtr privconn, virDomainObjPtr dom)
|
|||
if (PRL_FAILED(waitJob(job)))
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < dom->def->nnets; i++)
|
||||
prlsdkCleanupBridgedNet(privconn, dom->def->nets[i]);
|
||||
|
||||
if (prlsdkSendEvent(privconn, dom, VIR_DOMAIN_EVENT_UNDEFINED,
|
||||
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED) < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue