fix(xapi/VDI_destroy): respect vdiDestroyRetryWhenInUse option

This commit is contained in:
Julien Fontanet 2021-04-14 10:23:53 +02:00
parent da67298b43
commit 864946477b

View File

@ -15,7 +15,7 @@ module.exports = class Vdi {
await pCatch.call(
// work around a race condition in XCP-ng/XenServer where the disk is not fully unmounted yet
pRetry(() => this.callAsync('VDI.destroy', vdiRef), {
...this._vdiDestroyRetry,
...this._vdiDestroyRetryWhenInUse,
when: { code: 'VDI_IN_USE' },
}),
// if this VDI is not found, consider it destroyed