Skip to content

Commit

Permalink
fix(backup/mirror): don't run healthcheck if nothing as been transferred
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed Feb 22, 2024
1 parent a8da0b2 commit 5e950a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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 backup have been transferred')
return
}
return Task.run(
{
name: 'health check',
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- [Plugins/audit] Don't log `tag.getAllConfigured` calls
- [Remotes] Correctly clear error when the remote is tested with success
- [Backups/Full] Fix `Cannot read properties of undefined (reading 'healthCheckVmsWithTags')`
- [Backups/Healthcheck] Don't run health checks after empty mirror backups

### Packages to release

Expand Down

0 comments on commit 5e950a2

Please sign in to comment.