diff --git a/@xen-orchestra/backups/_VmBackup.js b/@xen-orchestra/backups/_VmBackup.js index cfd646c6450..961f2acc1b7 100644 --- a/@xen-orchestra/backups/_VmBackup.js +++ b/@xen-orchestra/backups/_VmBackup.js @@ -153,6 +153,9 @@ class VmBackup { errors.push(error) this.delete(writer) warn(warnMessage, { error, writer: writer.constructor.name }) + Task.warning( + `the writer ${writer.constructor.name} has failed the step ${warnMessage} with error ${error.message}. It won't be used anymore in this job execution.` + ) } }) if (writers.size === 0) { @@ -433,6 +436,7 @@ class VmBackup { ) await this._callWriters(async writer => { + await Task.run({ name: 'beforeBackup' }, () => writer.beforeBackup()) await writer.beforeBackup() $defer(async () => { await writer.afterBackup() diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 214e0fd1645..d233758c311 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -11,6 +11,8 @@ > Users must be able to say: “I had this issue, happy to know it's fixed” +- [Backup] show a warning in the task log if a writer fails, an error if they all fail (PR [#6266](https://github.com/vatesfr/xen-orchestra/pull/6266)) + ### Packages to release > When modifying a package, add it here with its release type. @@ -26,6 +28,7 @@ - @xen-orchestra/xapi minor +- @xen-orchestra/backups minor - xo-server patch