@xen-orchestra/backups 0.52.1 → 0.52.3
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.
|
@@ -264,7 +264,9 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
264
264
|
}
|
|
265
265
|
})
|
|
266
266
|
})
|
|
267
|
+
}
|
|
267
268
|
|
|
269
|
+
async _removeSnapshotData() {
|
|
268
270
|
// now that we use CBT, we can destroy the data of the snapshot used for this backup
|
|
269
271
|
// going back to a previous version of XO not supporting CBT will create a full backup
|
|
270
272
|
// this will only do something after snapshot and transfer
|
|
@@ -280,12 +282,12 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
280
282
|
this._settings.cbtDestroySnapshotData
|
|
281
283
|
) {
|
|
282
284
|
Task.info('will delete snapshot data')
|
|
283
|
-
const vdiRefs = await this._xapi.VM_getDisks(this._exportedVm
|
|
284
|
-
await
|
|
285
|
+
const vdiRefs = await this._xapi.VM_getDisks(this._exportedVm.$ref)
|
|
286
|
+
await this._xapi.call('VM.destroy', this._exportedVm.$ref)
|
|
285
287
|
for (const vdiRef of vdiRefs) {
|
|
286
288
|
try {
|
|
287
289
|
// data_destroy will fail with a VDI_NO_CBT_METADATA error if CBT is not enabled on this VDI
|
|
288
|
-
await
|
|
290
|
+
await this._xapi.call('VDI.data_destroy', vdiRef)
|
|
289
291
|
Task.info(`Snapshot data has been deleted`, { vdiRef })
|
|
290
292
|
} catch (error) {
|
|
291
293
|
Task.warning(`Couldn't deleted snapshot data`, { error, vdiRef })
|
|
@@ -333,15 +335,22 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
333
335
|
const reason = 'VM migration is blocked during backup'
|
|
334
336
|
await vm.update_blocked_operations({ pool_migrate: reason, migrate_send: reason })
|
|
335
337
|
|
|
336
|
-
$defer(() =>
|
|
338
|
+
$defer(async () => {
|
|
337
339
|
// delete the entries if they did not exist previously or if they were
|
|
338
340
|
// equal to reason (which happen if a previous backup was interrupted
|
|
339
341
|
// before resetting them)
|
|
340
|
-
vm.update_blocked_operations({
|
|
342
|
+
await vm.update_blocked_operations({
|
|
341
343
|
migrate_send: migrate_send === undefined || migrate_send === reason ? null : migrate_send,
|
|
342
344
|
pool_migrate: pool_migrate === undefined || pool_migrate === reason ? null : pool_migrate,
|
|
343
345
|
})
|
|
344
|
-
|
|
346
|
+
|
|
347
|
+
// 2024-08-19 - Work-around a XAPI bug where allowed_operations are not properly computed when blocked_operations is updated
|
|
348
|
+
//
|
|
349
|
+
// this is a problem because some clients (e.g. XenCenter) use this field to allow operations.
|
|
350
|
+
//
|
|
351
|
+
// internal source: https://team.vates.fr/vates/pl/mjmxnce9qfdx587r3qpe4z91ho
|
|
352
|
+
await vm.$call('update_allowed_operations')
|
|
353
|
+
})
|
|
345
354
|
}
|
|
346
355
|
|
|
347
356
|
await this._fetchJobSnapshots()
|
|
@@ -373,6 +382,7 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
|
|
|
373
382
|
|
|
374
383
|
await this._fetchJobSnapshots()
|
|
375
384
|
await this._removeUnusedSnapshots()
|
|
385
|
+
await this._removeSnapshotData()
|
|
376
386
|
}
|
|
377
387
|
await this._healthCheck()
|
|
378
388
|
}
|
|
@@ -140,6 +140,7 @@ export class IncrementalRemoteWriter extends MixinRemoteWriter(AbstractIncrement
|
|
|
140
140
|
if (isDifferencing) {
|
|
141
141
|
assert.notStrictEqual(
|
|
142
142
|
parentVdiPaths,
|
|
143
|
+
undefined,
|
|
143
144
|
'checkbasevdi must be called before updateUuidAndChain for incremental backups'
|
|
144
145
|
)
|
|
145
146
|
const parentPath = parentVdiPaths[dirname(path)]
|
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.52.
|
|
11
|
+
"version": "0.52.3",
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=14.18"
|
|
14
14
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@vates/decorate-with": "^2.1.0",
|
|
26
26
|
"@vates/disposable": "^0.1.5",
|
|
27
27
|
"@vates/fuse-vhd": "^2.1.1",
|
|
28
|
-
"@vates/nbd-client": "^3.0
|
|
28
|
+
"@vates/nbd-client": "^3.1.0",
|
|
29
29
|
"@vates/parse-duration": "^0.1.1",
|
|
30
30
|
"@xen-orchestra/async-map": "^0.1.2",
|
|
31
31
|
"@xen-orchestra/fs": "^4.1.7",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"tar": "^6.1.15",
|
|
48
48
|
"uuid": "^9.0.0",
|
|
49
49
|
"vhd-lib": "^4.11.0",
|
|
50
|
-
"xen-api": "^4.
|
|
50
|
+
"xen-api": "^4.2.0",
|
|
51
51
|
"yazl": "^2.5.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"tmp": "^0.2.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@xen-orchestra/xapi": "^7.
|
|
61
|
+
"@xen-orchestra/xapi": "^7.3.0"
|
|
62
62
|
},
|
|
63
63
|
"license": "AGPL-3.0-or-later",
|
|
64
64
|
"author": {
|