@xen-orchestra/backups 0.42.1 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -31,6 +31,11 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
31
31
|
throw new Error('cannot backup a VM created by this very job')
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
const currentOperations = Object.values(vm.current_operations)
|
|
35
|
+
if (currentOperations.some(_ => _ === 'migrate_send' || _ === 'pool_migrate')) {
|
|
36
|
+
throw new Error('cannot backup a VM currently being migrated')
|
|
37
|
+
}
|
|
38
|
+
|
|
34
39
|
this.config = config
|
|
35
40
|
this.job = job
|
|
36
41
|
this.remoteAdapters = remoteAdapters
|
|
@@ -256,7 +261,15 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
256
261
|
}
|
|
257
262
|
|
|
258
263
|
if (this._writers.size !== 0) {
|
|
259
|
-
|
|
264
|
+
const { pool_migrate = null, migrate_send = null } = this._exportedVm.blocked_operations
|
|
265
|
+
|
|
266
|
+
const reason = 'VM migration is blocked during backup'
|
|
267
|
+
await this._exportedVm.update_blocked_operations({ pool_migrate: reason, migrate_send: reason })
|
|
268
|
+
try {
|
|
269
|
+
await this._copy()
|
|
270
|
+
} finally {
|
|
271
|
+
await this._exportedVm.update_blocked_operations({ pool_migrate, migrate_send })
|
|
272
|
+
}
|
|
260
273
|
}
|
|
261
274
|
} finally {
|
|
262
275
|
if (startAfter) {
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/vatesfr/xen-orchestra.git"
|
|
10
10
|
},
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.43.0",
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=14.18"
|
|
14
14
|
},
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"proper-lockfile": "^4.1.2",
|
|
45
45
|
"tar": "^6.1.15",
|
|
46
46
|
"uuid": "^9.0.0",
|
|
47
|
-
"vhd-lib": "^4.6.
|
|
47
|
+
"vhd-lib": "^4.6.1",
|
|
48
48
|
"xen-api": "^1.3.6",
|
|
49
49
|
"yazl": "^2.5.1"
|
|
50
50
|
},
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"tmp": "^0.2.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@xen-orchestra/xapi": "^3.
|
|
59
|
+
"@xen-orchestra/xapi": "^3.2.0"
|
|
60
60
|
},
|
|
61
61
|
"license": "AGPL-3.0-or-later",
|
|
62
62
|
"author": {
|