diff --git a/@xen-orchestra/xapi/disks/Xapi.mjs b/@xen-orchestra/xapi/disks/Xapi.mjs index 6e0f1c71d7..d744c4cb6f 100644 --- a/@xen-orchestra/xapi/disks/Xapi.mjs +++ b/@xen-orchestra/xapi/disks/Xapi.mjs @@ -7,6 +7,7 @@ import { DiskLargerBlock, DiskPassthrough, ReadAhead, TimeoutDisk } from '@xen-orchestra/disk-transform' import { createLogger } from '@xen-orchestra/log' +import { Task } from '@vates/task' import { XapiVhdCbtSource } from './XapiVhdCbt.mjs' import { XapiStreamNbdSource } from './XapiStreamNbd.mjs' import { XapiVhdStreamSource } from './XapiVhdStreamSource.mjs' @@ -14,7 +15,6 @@ import { XapiProgressHandler } from './XapiProgress.mjs' import { XapiQcow2StreamSource } from './XapiQcow2StreamSource.mjs' import { VDI_FORMAT_QCOW2, VDI_FORMAT_VHD, VHD_MAX_SIZE } from '../index.mjs' -// @todo how to type this ? const { debug, info, warn } = createLogger('xo:xapi:xapi-disks') /** @@ -111,7 +111,10 @@ export class XapiDiskSource extends DiskPassthrough { } } catch (err) { if (err.code === 'NO_NBD_AVAILABLE') { - warn(`can't connect through NBD, fall back to stream export`) + const warningMessage = `can't connect through NBD, fall back to stream export` + // @ts-ignore Task.warning is a static alias set up dynamically, not visible to TS + Task.warning(warningMessage) + warn(warningMessage, err) if (streamSource === undefined) { throw new Error(`Can't open stream source`) } @@ -189,7 +192,10 @@ export class XapiDiskSource extends DiskPassthrough { // init probaby failed, so nothing to close , but better safe than sorry await source?.close().catch(warn) if (baseRef !== undefined) { - warn(`can't compute delta ${vdiRef} from ${baseRef}, fallBack to a full`, { error }) + const warningMessage = `can't compute delta ${vdiRef} from ${baseRef}, fall back to a full` + // @ts-ignore Task.warning is a static alias set up dynamically, not visible to TS + Task.warning(warningMessage) + warn(warningMessage, { error }) this.#baseRef = undefined return this.#openExportStream() } else { diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 4262383ed7..ec43aca2fc 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -53,6 +53,7 @@ - [XO6/New VM] Add the possibility to set the HA restart priority when creating a VM (PR [#10072](https://github.com/vatesfr/xen-orchestra/pull/10072)) - [REST API] Add `POST /srs` REST route to create a storage repository (PR [#9990](https://github.com/vatesfr/xen-orchestra/pull/9990)) - [XO6/Pool] Add connect/disconnect action on page Site (PR [#10075])(https://github.com/vatesfr/xen-orchestra/pull/10075) +- [Backups] Show reason when delta backup falls back to a full (PR [#10148](https://github.com/vatesfr/xen-orchestra/pull/10148)) ### Bug fixes @@ -99,7 +100,7 @@ - @xen-orchestra/rest-api minor - @xen-orchestra/web minor - @xen-orchestra/web-core minor -- @xen-orchestra/xapi patch +- @xen-orchestra/xapi minor - vhd-lib patch - xapi-explore-sr patch - xen-api minor