* fix(xo-server,rest-api): apply the backup guard to rolling pool operations started over REST
The JSON-RPC methods pool.rollingUpdate and pool.rollingReboot refused to run
while a backup job targets the pool, but the REST actions
POST /pools/:id/actions/rolling_update and rolling_reboot called the
orchestrators directly and skipped that check.
The guard now lives in XenServers.rollingPoolUpdate and Pools.rollingPoolReboot,
so every entry point (JSON-RPC, REST, scheduled jobs) applies the same rule.
The bypass moves into backupGuard(poolId, { bypassBackupCheck, operation }),
which logs a single warning with the operation and the user, and the other
callers (host.restart, host.restartAgent, host.stop, sr.reclaimSpace and their
REST counterparts) use it instead of their own if/else and log.
The REST rolling actions accept bypassBackupCheck in their body and record the
body in the task params, like the host actions do.
* fix(xo-server,rest-api): pass the targeted object ID to the backup guard
* feat: add setChainToParent in order to point header/footer to a new parent
* feat: add getCompressionType and use it in isMergeableParent in RemoteAdapter
* feat: use openDisposableDisk instead of openVhd
* fixup! feat: add setChainToParent in order to point header/footer to a new parent
* feat: add tests for setChainToParent
* fix: from review
* feat: make isMergeableParent contained in remoteDisk
* fix: remove chainToParent now useless
* feat: remove compressionType and isMergeableParent where unneeded
* feat: update test
* feat: handle compressionType in remoteAdapter and fs
* fix: use remoteHandler as config getter
* feat: remove useless isDirectory in remoteDisk
* fix: small change on mode option
Since the XO documentation structure was changed recently,
so did the URLs to each documentation pages.
This broke multiple links in the XO app,
which pointed to the XO doc.
This commit updates the links to the current URLs,
so that the link work as intended.
Signed-off-by: Thomas Moraine <thomas.moraine@vates.tech>
* fix fbeauchamp comments
* feat(backups): add a journal
* fix cache writing on immutable remotes
* add typing
* feat(backups): shard the journal per UTC day, one entry per time
`readBackupJournal()` listed the whole `xo-backup-log/` and filtered the names
client-side, so the cost of a read grew with the whole history of the repository.
Store the entries as `/xo-backup-log/<YYYYMMDD>/<HHMMSS.mmmZ>-<rand>-<event>-<vmUuid>-<file>`
and list only the days which can hold entries newer than `since`: a read now costs one
listing of the journal root plus one listing per day it is missing — normally a single
day, at most two, since a reader rebuilds from scratch when its watermark crosses a UTC
day. Purging old entries also becomes a directory removal instead of a per-object sweep.
The day is not repeated in the entry name, so `since` bounds the time of its own day
only; every later day is taken whole.
* fix pipeline
---------
Co-authored-by: All-Ki <killian.allegrain@vates.tech>
* feat(qcow2): improve generation speed
the idea is to build a bit index of the clusters to store them efficiently instead
of going through all the possible blocks 3 times at different phases of the generation.
The memory consumption is 2MB/TB of disk
this index generation can still be quite long , so we use setImmediate from
time to time to le the rest of the nodejs event loop run
also make this index phase abortable
[XO-2789]
* Extracts the backup migration logic into backup-archive and adds a cache guard for future performance improvements
* don't generate or read cache file on immutable backup repository
* clean cache file on immutable backup repository
* fix(backups): fetch failed
disable compresion between xoa on proxy on xoa side
* fix(xo-proxy): disable compression on the proxy
it was disable with hrp, replaced by #10038 since it was never
sending accept-encoding header
compression can be put back later on a route by route basis after
careful checks ( for example : file restore, backup listing )
* fix(backups): task label NBT->NBD
* fix: still force a list block only call for NBD + stream scenario , that was failing to transfer disk on fallback
* feat(lite): add create network and network bonded actions
* remove vlan required and info message
* feedback number one
* feat(lite): add create network and network bonded actions
* feat(lite): add action create internal network
* update changelog file
* fix rebase
* feedback number one
* remove as const in cancelRoute
* feedback number two
* feat(xo6): rebase detach
* add redirect when detach ok
* fix post rebase
* remove dev route
* returns from MR
* add check master host
* use linked translation
* rebase ok
* fix(backups): timeout was not used correctly for NBD transfers
* fix(nbd-client): evict a dead client in multi instead
actual code was retrying 5 times, each time with a 60s timeout
multi also have its own retry on conneciton
since the client used is determnistic for a block, any stalled client
will be hammerred for a lot of time before giving up
this PR evict a nbd client that is failing to read a block (with its
retry logic)
* fix(nbd-client/multi): better spread read accross client
the actual code derivate the clientId from the block index
we have no information on the block distribution, only hopes that
it's random enough
this PR introduce a mechanism to use a round robin to select
the next client
* fix: correct fall back to full with /without nbd on qcow2
Adds a synchronizedSnapshot backup setting. When enabled, all of a job's VM snapshots are taken up front in a batch before any transfer begins, and each VM's backup then reuses its pre-taken snapshot instead of snapshotting again.
Settings:
synchronizedSnapshot:
false (default)
true (synchronize every VM in the job)
<tag> (synchronize only VMs carrying that tag, others are backed up normally).
snapshotConcurrency: max concurrent snapshots during the batch phase (default 2).
A batch member that fails to open is silently dropped from synchronization and backed up normally.
Unit tested where applicable and e2e tests added in qa-test.
Checkbox added in xo5 backup jobs to synchronize snapshots, tags not supported yet.