Skip to content

Commit

Permalink
fix(backups/heatcheck): don't skip healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Feb 21, 2024
1 parent 814e987 commit a3df7b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions @xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export const Abstract = class AbstractVmBackupRunner {
if (this._healthCheckSr === undefined) {
return
}
if (this._metadataFileName === undefined) {
// when a mirror backup did not transfer anything, we can't do a healthcheck
return
}

// check if current VM has tags
const tags = this._tags
Expand Down
10 changes: 5 additions & 5 deletions @xen-orchestra/backups/_runners/_writers/_MixinRemoteWriter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ export const MixinRemoteWriter = (BaseClass = Object) =>
healthCheck() {
const sr = this._healthCheckSr
assert.notStrictEqual(sr, undefined, 'SR should be defined before making a health check')
assert.notStrictEqual(
this._metadataFileName,
undefined,
'Metadata file name should be defined before making a health check'
)
if (this._metadataFileName === undefined) {
// this can happen when making a mirror backup with nothing to transfer
Task.info('no health check, since no backups have been transferred')
return
}
return Task.run(
{
name: 'health check',
Expand Down

0 comments on commit a3df7b7

Please sign in to comment.