fix(xo-server/vm.create): work around a race condition (#2755)
Fixes #2747
This commit is contained in:
parent
80c1e39b53
commit
f5511449af
@ -160,12 +160,11 @@ export async function create (params) {
|
||||
])
|
||||
}
|
||||
|
||||
for (const vifId of vm.VIFs) {
|
||||
const vif = this.getObject(vifId, 'VIF')
|
||||
for (const vif of xapiVm.$VIFs) {
|
||||
await this.allocIpAddresses(
|
||||
vifId,
|
||||
concat(vif.allowedIpv4Addresses, vif.allowedIpv6Addresses)
|
||||
).catch(() => xapi.deleteVif(vif._xapiId))
|
||||
vif.$id,
|
||||
concat(vif.ipv4_allowed, vif.ipv6_allowed)
|
||||
).catch(() => xapi.deleteVif(vif))
|
||||
}
|
||||
|
||||
if (params.bootAfterCreate) {
|
||||
|
Loading…
Reference in New Issue
Block a user