feat(xo-server/backup-ng): emit warning task when zstd is chosen but not supported (#4375)
See #3892
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [VM/Advanced] Fix `"vm.set_domain_type" is not a function` error on switching virtualization mode (PV/HVM) [#4348](https://github.com/vatesfr/xen-orchestra/issues/4348) (PR [#4504](https://github.com/vatesfr/xen-orchestra/pull/4504))
|
||||
- [Backup NG/logs] Show warning when zstd compression is selected but not supported [#3892](https://github.com/vatesfr/xen-orchestra/issues/3892) (PR [#4375](https://github.com/vatesfr/xen-orchestra/pull/4375)
|
||||
|
||||
### Released packages
|
||||
|
||||
|
||||
@@ -1146,6 +1146,21 @@ export default class BackupNg {
|
||||
$defer.call(xapi, 'deleteVm', snapshot)
|
||||
}
|
||||
|
||||
let compress = getJobCompression(job)
|
||||
const pool = snapshot.$pool
|
||||
if (
|
||||
compress === 'zstd' &&
|
||||
pool.restrictions.restrict_zstd_export !== 'false'
|
||||
) {
|
||||
compress = false
|
||||
logger.warning(
|
||||
`Zstd is not supported on the pool ${pool.name_label}, the VM will be exported without compression`,
|
||||
{
|
||||
event: 'task.warning',
|
||||
taskId,
|
||||
}
|
||||
)
|
||||
}
|
||||
let xva: any = await wrapTask(
|
||||
{
|
||||
logger,
|
||||
@@ -1153,7 +1168,7 @@ export default class BackupNg {
|
||||
parentId: taskId,
|
||||
},
|
||||
xapi.exportVm($cancelToken, snapshot, {
|
||||
compress: getJobCompression(job),
|
||||
compress,
|
||||
})
|
||||
)
|
||||
const exportTask = xva.task
|
||||
|
||||
Reference in New Issue
Block a user