feat(vm.rollingDrCopy): failure to destroy old copies is not fatal
This commit is contained in:
parent
7286ddc338
commit
7bb73bee67
@ -706,11 +706,9 @@ export default class {
|
|||||||
})
|
})
|
||||||
await targetXapi.addTag(drCopy.$id, 'Disaster Recovery')
|
await targetXapi.addTag(drCopy.$id, 'Disaster Recovery')
|
||||||
|
|
||||||
const promises = []
|
await Promise.all(mapToArray(olderCopies.slice(0, -depth), vm =>
|
||||||
for (let surplus = olderCopies.length - (depth - 1); surplus > 0; surplus--) {
|
// Do not consider a failure to delete an old copy as a fatal error.
|
||||||
const oldDRVm = olderCopies.shift()
|
targetXapi.deleteVm(vm.$id)::pCatch(noop)
|
||||||
promises.push(targetXapi.deleteVm(oldDRVm.$id, true))
|
))
|
||||||
}
|
|
||||||
await Promise.all(promises)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user