Skip to content

Commit

Permalink
fix(backups/_MixinBackupWriter#afterBackup): execute merge on S3 (#6095)
Browse files Browse the repository at this point in the history
Introduced by 47f9da2
  • Loading branch information
fbeauchamp authored Jan 18, 2022
1 parent e15be7e commit c10601d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions @xen-orchestra/backups/writers/_MixinBackupWriter.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ exports.MixinBackupWriter = (BaseClass = Object) =>

async afterBackup() {
const { disableMergeWorker } = this._backup.config
// merge worker only compatible with local remotes
const { handler } = this._adapter
const willMergeInWorker = !disableMergeWorker && typeof handler._getRealPath === 'function'

const { merge } = await this._cleanVm({ remove: true, merge: disableMergeWorker })
const { merge } = await this._cleanVm({ remove: true, merge: !willMergeInWorker })
await this.#lock.dispose()

// merge worker only compatible with local remotes
const { handler } = this._adapter
if (merge && !disableMergeWorker && typeof handler._getRealPath === 'function') {
if (merge && willMergeInWorker) {
const taskFile =
join(MergeWorker.CLEAN_VM_QUEUE, formatFilenameDate(new Date())) +
'-' +
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 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Backup] Detect and clear orphan merge states, fix `ENOENT` errors (PR [#6087](https://github.com/vatesfr/xen-orchestra/pull/6087))
- [Backup] Ensure merges are also executed after backup on S3, maintaining the size of the VHD chain under control [Forum#45743](https://xcp-ng.org/forum/post/45743) (PR [#6095](https://github.com/vatesfr/xen-orchestra/pull/6095))

### Packages to release

Expand Down

0 comments on commit c10601d

Please sign in to comment.