@xen-orchestra/backups 0.47.0 → 0.48.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.
@@ -19,6 +19,7 @@ const DEFAULT_REMOTE_VM_SETTINGS = {
19
19
  exportRetention: 0,
20
20
  healthCheckSr: undefined,
21
21
  healthCheckVmsWithTags: [],
22
+ healthCheckTimeout: '10m',
22
23
  maxExportRate: 0,
23
24
  maxMergedDeltasPerRun: Infinity,
24
25
  nRetriesVmBackupFailures: 0,
@@ -24,6 +24,7 @@ const DEFAULT_XAPI_VM_SETTINGS = {
24
24
  fullInterval: 0,
25
25
  healthCheckSr: undefined,
26
26
  healthCheckVmsWithTags: [],
27
+ healthCheckTimeout: '10m',
27
28
  maxExportRate: 0,
28
29
  maxMergedDeltasPerRun: Infinity,
29
30
  nRetriesVmBackupFailures: 0,
@@ -8,6 +8,7 @@ import { HealthCheckVmBackup } from '../../HealthCheckVmBackup.mjs'
8
8
  import { ImportVmBackup } from '../../ImportVmBackup.mjs'
9
9
  import { Task } from '../../Task.mjs'
10
10
  import * as MergeWorker from '../../merge-worker/index.mjs'
11
+ import ms from 'ms'
11
12
 
12
13
  const { info, warn } = createLogger('xo:backups:MixinBackupWriter')
13
14
 
@@ -107,8 +108,10 @@ export const MixinRemoteWriter = (BaseClass = Object) =>
107
108
  restoredVm = await xapi.waitObject(restoredId)
108
109
  }
109
110
  try {
111
+ const timeout = ms(this._settings.healthCheckTimeout)
110
112
  await new HealthCheckVmBackup({
111
113
  restoredVm,
114
+ timeout,
112
115
  xapi,
113
116
  }).run()
114
117
  } finally {
@@ -3,6 +3,7 @@ import assert from 'node:assert/strict'
3
3
 
4
4
  import { HealthCheckVmBackup } from '../../HealthCheckVmBackup.mjs'
5
5
  import { Task } from '../../Task.mjs'
6
+ import ms from 'ms'
6
7
 
7
8
  export const MixinXapiWriter = (BaseClass = Object) =>
8
9
  class MixinXapiWriter extends BaseClass {
@@ -70,8 +71,10 @@ export const MixinXapiWriter = (BaseClass = Object) =>
70
71
  const healthCheckVm =
71
72
  xapi.getObject(healthCheckVmRef, undefined) ?? (await xapi.waitObject(healthCheckVmRef))
72
73
  await healthCheckVm.add_tags('xo:no-bak=Health Check')
74
+ const timeout = ms(this._settings.healthCheckTimeout)
73
75
  await new HealthCheckVmBackup({
74
76
  restoredVm: healthCheckVm,
77
+ timeout,
75
78
  xapi,
76
79
  }).run()
77
80
  } finally {
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.47.0",
11
+ "version": "0.48.0",
12
12
  "engines": {
13
13
  "node": ">=14.18"
14
14
  },
@@ -58,7 +58,7 @@
58
58
  "tmp": "^0.2.1"
59
59
  },
60
60
  "peerDependencies": {
61
- "@xen-orchestra/xapi": "^5.0.0"
61
+ "@xen-orchestra/xapi": "^5.0.1"
62
62
  },
63
63
  "license": "AGPL-3.0-or-later",
64
64
  "author": {