Skip to content

Commit

Permalink
fix(backups): handle slow enable cbt
Browse files Browse the repository at this point in the history
when VDI.enable_cbt is too slow to answer we may take the snapshot before
cbt is enabled, it fails silently , then take the snapshot , then
on the next backup cbt is enabled , but it fails because cbt started
after the last snapshot, but since cbt was enabled, the data are purged,
leading to a new full backup
  • Loading branch information
fbeauchamp committed Nov 12, 2024
1 parent 02f34c1 commit 9933133
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const AbstractXapi = class AbstractXapiVmBackupRunner extends Abstract {
try {
// enable CBT on all disks if possible
const diskRefs = await xapi.VM_getDisks(vm.$ref)
await Promise.all(diskRefs.map(diskRef => xapi.call('VDI.enable_cbt', diskRef)))
await Promise.all(diskRefs.map(diskRef => xapi.callAsync('VDI.enable_cbt', diskRef)))
} catch (error) {
Task.info(`couldn't enable CBT`, error)
}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
### Bug fixes

> Users must be able to say: “I had this issue, happy to know it's fixed”
> [Backup] Handle slow cbt_enable leading to full backups
### Packages to release

Expand All @@ -33,6 +34,7 @@
<!--packages-start-->

- @xen-orchestra/backups patch
- @xen-orchestra/log minor
- @xen-orchestra/web patch
- @xen-orchestra/web-core minor
Expand Down

0 comments on commit 9933133

Please sign in to comment.