fix(Xapi#_deleteVm): fix parallel calls

Fixes vatesfr/xo-web#2297
This commit is contained in:
Julien Fontanet 2017-08-08 13:03:44 +02:00
parent 5488a2d60a
commit a2b06972d0
3 changed files with 6 additions and 5 deletions

View File

@ -110,7 +110,7 @@
"tmp": "^0.0.31", "tmp": "^0.0.31",
"uuid": "^3.0.1", "uuid": "^3.0.1",
"ws": "^3.0.0", "ws": "^3.0.0",
"xen-api": "^0.14.0", "xen-api": "^0.14.1",
"xml2js": "~0.4.17", "xml2js": "~0.4.17",
"xo-acl-resolver": "^0.2.3", "xo-acl-resolver": "^0.2.3",
"xo-collection": "^0.4.1", "xo-collection": "^0.4.1",

View File

@ -662,7 +662,8 @@ export default class Xapi extends XapiBase {
await this.call('VM.hard_shutdown', $ref) await this.call('VM.hard_shutdown', $ref)
} }
await this.barrier('VM', $ref) // ensure the vm record is up-to-date
vm = await this.barrier('VM', $ref)
return Promise.all([ return Promise.all([
this.call('VM.destroy', $ref), this.call('VM.destroy', $ref),

View File

@ -7093,9 +7093,9 @@ xdg-basedir@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
xen-api@^0.14.0: xen-api@^0.14.1:
version "0.14.0" version "0.14.1"
resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.14.0.tgz#93bfb9f35daca1092237f1a0dfb211005a8e7916" resolved "https://registry.yarnpkg.com/xen-api/-/xen-api-0.14.1.tgz#1b70226cf98f19353e789baf1d7ec4d73d9137a1"
dependencies: dependencies:
babel-polyfill "^6.23.0" babel-polyfill "^6.23.0"
blocked "^1.2.1" blocked "^1.2.1"