6721 Commits

Author SHA1 Message Date
spacotte-vates
5601a64703 feat(complex-matcher): use complex matcher for backup jobs (#10064)
Use complex matcher for healtcheck and full backup interval in backup jobs

(XO-2435)
2026-11-02 17:49:16 +01:00
MlssFrncJrg
7985244daf feat: technical release (#10677)
* feat(@vates/iscsi): 0.4.0

* feat(@vates/types): 2.5.0

* feat(@xen-orchestra/backups): 0.78.0

* feat(@xen-orchestra/backups-cli): 1.1.18

* feat(@xen-orchestra/disk-cli): 2.2.5

* feat(@xen-orchestra/immutable-backups): 3.0.9

* feat(@xen-orchestra/web-core): 0.65.0

* feat(@xen-orchestra/mixins): 0.23.0

* feat(@xen-orchestra/proxy): 0.34.0

* feat(@xen-orchestra/vmware-explorer): 1.2.0

* feat(@xen-orchestra/qa-test): 1.4.0

* feat(@xen-orchestra/rest-api): 0.41.1

* feat(@xen-orchestra/web): 0.65.0

* feat(xo-server): 5.213.0

* feat(xo-server-sdn-controller): 1.6.0

* feat(xo-web): 5.208.0

* chore(CHANGELOG): update next
2026-10-28 16:02:08 +01:00
Killian
092133f811 feat(sdn-controller): traffic rules ordering (#10525) 2026-10-28 10:19:02 +01:00
spacotte-vates
54c52e8f24 feat(cli): Add disable-remote command (#10587)
* fix(remotes): improve unresponsive remote handling
2026-10-28 10:05:11 +01:00
Florent BEAUCHAMP
e2ca66130c feat(live-mount): optional local VDI cache, making the mount read/write (#10434)
* refactor(mixins,proxy,xo-server): pass the XAPI names as one xapiLabels object

The SR name was a lone `nameLabel` threaded through xo-server, xo-proxy and
the mixin; the VDI names are about to join it. No change in behavior: the
proxy API still takes `nameLabel`.

Also export OC_MOUNT from _utils.mjs, the cache module will need it.

* feat(iscsi): FileBlockDevice can serve a block device node

With `size`, the path must be a block device (e.g. a VDI hot-plugged onto the
appliance, /dev/xvdX): its inode reports a size of 0, so the capacity comes
from the caller, and a short read is an I/O error instead of a sparse tail.

Also add unit tests for FileBlockDevice, which had none, and integration
tests against a loop device.

* feat(iscsi): advertise read-only LUNs as write protected

A read-only BlockDevice now sets the Write Protect bit of MODE SENSE, so the
guest mounts the disk read-only instead of failing on its first write. This is
the case of a live mounted disk, served by a read-only DiskBlockDevice.

* feat(live-mount): name the SR and VDI after the backed up VM and restore point

The SR is now `[XO live mount] <VM> (<backup date>)` and the VDI keeps the
name of the backed up disk, so a live mounted disk reads like the disk the
user knows. The VDI is also tagged with `xo:live-mount`, like the SR.

The proxy API takes them as `xapiLabels`; `nameLabel` is still accepted from
older XOs.

* feat(live-mount): optional local VDI cache, making the mount read/write

Without a cache, a live mounted disk is read-only and every read goes to the
backup repository. With `cacheSrId` (xo-server) / `cacheSr` (proxy API), the
disk is materialized block by block into a VDI of that SR, hot-plugged onto
the appliance serving the mount (XOA or the proxy):

- a block is read from the backup repository at most once;
- the LUN is read/write, writes land in the cache VDI and the backup is never
  modified;
- the VDI is created with the mount and destroyed with it: what was written
  is lost on unmount.

The appliance must be a VM of the target pool, and the SR plugged on the host
running it. On a local SR, the appliance must not be migrated while the mount
lasts, since the cache VDI cannot follow it: this is documented, not enforced.

The cache VDI is tagged `[NOBAK] [NOSNAP]` to stay out of the appliance's own
backups, and the SR of a cached mount is named `[XO live restore] …`. The
cache device is opened with retries, since its node may lag behind the
hot-plug.
2026-10-28 09:00:03 +01:00
Joris K
666a99706e feat(xo6): add page plugins (#10593)
* feat(xo6): add page plugins

* improve error summary component

* plugin configuration form review

* fix(xo6): adapt plugins to master after rebase

- FrontXoPlugin keeps the plugin types of @vates/types (strict union since #10588)
- tests follow the state checks, task params and loading state of the master backend

* chore(xo6): add plugins page to the changelog

* fix(xo6): pluralize the examples count and unprefix generic plugin i18n keys

* fix(xo6): drop JSDoc from the json-schema form

* test(xo6): align the plugin tests with the existing test patterns

Component tests mock the plugin jobs and assert their run and arguments instead of the REST requests, job tests mock fetch.util directly with run/validate blocks, composable tests use a local mockJob, and createPlugin gets the factory JSDoc.

* refactor(xo6): name the json-schema form conditions and share the object schema guard

* refactor(xo6): expose the summary errors from the json-schema form

* refactor(xo6): name the plugin save and test steps

* fix(xo6): use the delete action icon in the plugin delete buttons

* revert(xo6): drop the capitalize prop of UiToggle

* refactor(xo6): remove the go-to-first-error button of the plugin configuration

* refactor(xo6): use VtsDeleteButton in the plugin configuration deletion

* revert(web-core): keep useValidatedForm and useFormSelect as on master

The plugin forms focus their first missing field through useJsonSchemaForm, so the
error summary and focus-on-validate of useValidatedForm had no consumer and changed
the behaviour of the existing forms.

* feat(web-core): use the puzzle icon for plugins and the window icon for templates

* feat(xo6): plugin load and startup actions in the plugins table, panel and header

- Side panel: Load/Unload button + "Enable/Disable load at startup" in more actions,
  loaded / load at startup as statuses, copiable version and description, no bottom link button
- Table: action column (select + quick actions) replaces the select column
- Detail head bar: same actions, PluginStateToggles removed
- One plugin.change-state job replaces the load and unload jobs; updatePluginAutoload
  and isPluginLoaded move to xo-plugin.util.ts
- useXoPluginUtils no longer exposes description
- Shared test helpers: createJobResult, createActionItem, findTooltipContent

* feat(xo6): read-only plugin detail page, configuration and test in drawers

- Detail page: general info + schema-driven read-only configuration card (VtsColumns)
- Configure: primary action in head bar, side panel and table row, opens a drawer
- Test: drawer from the more-actions menus; delete configuration in the same menus
- Errors follow the app pattern: the drawer stays open on job failure
- Delete configuration is blocked while the plugin is loaded (the API rejects it)
- Secrets: masked by xo-server's name rule or by the value obfuscated by the API
- web-core: VtsActionItems extracted from VtsActionsMenu for menu-slot reuse

* feat(xo6): show the plugin Configure action first, next to Load

* refactor(xo6): remove the unused ApiErrorAlert, useActionError and api-error utils

* refactor(xo6): de-duplicate the plugin drawer composables and test fixtures

- one useXoPluginDrawerJob replaces the near-identical configure and test composables
- useXoPluginUtils exposes the description and loaded state used by the templates
- shared plugin schema fixture and JSON schema item-label test helpers

* refactor(xo6): de-duplicate the JSON schema fields and the plugin tests

- JsonSchemaInputWrapper holds the input wrapper, message and validation of the input, select and XO object fields
- JsonSchemaField wraps the object and array fields in their fieldset, which owns the optional value
- shared test helpers for drawers, plugin actions, titles and JSON schema forms

* refactor(xo6): reuse @vates/obfuscate and cover the JSON schema select fields

- @vates/obfuscate exports isSensitiveParam and ships its types; XO 6 imports it and OBFUSCATED_VALUE instead of copies
- tests for the select, XO object field and useXoObjectOptions; drop the select guard that could never run
- JsonSchemaValue titles its sections in a computed and checks the secret mask

* feat(xo6): show the arrays of a plugin configuration as a list

* refactor(xo6): share the plugin route and the item label type, remove the unused required key

* docs(lite): add a story for VtsActionItems

* feat(xo6): validate the numeric limits, integers and list sizes of the plugin forms

The JSON schema form only checked the required fields, so a value under minimum, over maximum, a decimal number for an integer or a list shorter than minItems was only rejected by the server. oneOf is still left to the server.

* test(xo6): share the drawer, button and tag test helpers, test the preset application

Replaces the local submit, button and tag lookups of the backup repository, plugin, host and VM tests with the src/test helpers, makes PluginMoreActions assert its wiring instead of its mock, and documents the new helpers.

* test(xo6): test the plugin form lists, sections, messages and links, extract the property grouping

* fix(xo6): do not test a plugin while it is being loaded or unloaded

* refactor(xo6): give fetchPut and fetchPatch no default type, like fetchPost

* refactor(xo6): identify a missing plugin in the plugin job argument instead of in defineJob

* refactor(xo6): remove the unused disabled prop from the JSON schema form

* refactor(xo6): detect the plugin secrets in the front only, leave @vates/obfuscate as on master

- the secret property names and the obfuscated value are local to XO 6 again, no @vates/obfuscate export, types or release
- the backup repository and plugin tests import the obfuscated value from the shared constants

* refactor(xo6): use checkboxes instead of toggles in the plugin forms

* test(xo6): get a checkbox by its label with a shared test helper

* test(xo6): reset the state of the array items when the list is replaced from the outside

* refactor(xo6): split the JSON schema form dir into the plugin components, utils, composables and form dirs

---------

Co-authored-by: Olivier Floch <olivier.floch@vates.fr>
2026-10-27 11:42:45 +01:00
Florent BEAUCHAMP
c2bda04112 feat(v2v): enable CBT automatically + use soft shutdown when possible (#10637) 2026-10-27 10:24:16 +01:00
Sebastien Marie
0be905e7cf fix(xo-server-sdn-controller): clean up partial state on network registration failure
When privateNetwork.addNetwork() fails during xapi connection, the network is 
already inserted in privateNetwork.networks and a center may have been set 
without being recorded in _starCenters, leaving a broken PrivateNetwork 
registered.

After the registration loop, remove the network that failed to register, drop 
the orphaned center, and delete the PrivateNetwork once it has no network left, 
like _handleDisconnectedXapi already does.

Also defer pushing to noVniNetworks until the network is registered, so a failed 
network gets no VNI and does not trigger _electNewCenter outside of any 
try/catch.
2026-10-26 17:54:01 +01:00
Sebastien Rodot
248a6e025c test(xo-server-sdn-controller): Add reliability tests for stale center and unplugged PIF
- handles a stale preferred-center host gracefully
- handles PIF unplugged when center is undefined
2026-10-26 17:54:01 +01:00
Sebastien Rodot
d4dd0791f2 fix(xo-server-sdn-controller): Guard center.$ref access in _pifUpdated and _hostUnreachable
Avoid to dereference privateNetwork.center without checking it first.
2026-10-26 17:54:01 +01:00
Sebastien Rodot
1329b7bc69 fix(xo-server-sdn-controller): Wrap per-network processing in try/catch
Wrap the entire per-network registration body (after the privateNetwork creation 
check) in a try/catch so one network's failure doesn't affect others.

Reorder `xo:sdn-controller:vni` to after `privateNetwork.addNetwork()` call to 
manage more easily the undo.
2026-10-26 17:54:01 +01:00
Sebastien Rodot
b9fa292b9d fix(xo-server-sdn-controller): Wrap preferred-center lookup in try/catch
The value stored for preferred-center could be wrong or out-of-date. If no XAPI 
object exists with such uuid (the host designed as preferred center was 
removed from XAPI), avoid to hard fail, and consider the value is absent.
2026-10-26 17:54:01 +01:00
Mathieu
767fc2cb76 fix(xo-server): fix cannot read properties of undefined (#10668)
Introduced by e58587aa1d
2026-10-26 11:02:03 +01:00
Bastien Nollet
d2ffe1ad56 feat: technical release (#10667) 2026-10-23 12:04:08 +02:00
Bastien Nollet
a508ca7897 fix(xo-web): limit concurency on mass orphan VDI deletion (#10663) 2026-10-23 10:28:26 +02:00
Killian
988d466cba feat(backups) : sets the backup archives as a collection and streams changes as they happen (#10567)
The `backup-archive` SSE collection (#10472) only announced a change when a client listed the
repository: XO never read one on its own, so a subscriber learnt of a backup created, merged or
deleted at the next listing by any client, and after a restart heard nothing from a repository
until a client listed it.

XO now reads the repositories itself:
- every enabled repository is listed once XO has started, one after another, and a repository
  enabled later as soon as `updateRemote()` has stored it;
- the changes this XO makes are pushed at once, for a repository whose journal can be replayed: at
  the end of each VM export to it (worker, no-worker mode and proxy alike), at the end of the job
  and after a deletion. A read in progress when `refresh()` is called reads again, since it may
  have missed the change, at most 3 times and never when that means listing the repository in full;
- the other changes (the size the merge worker rewrites, another XO sharing the repository) are
  read by two timers, 2 repositories at a time and through the listing backoff: every minute from
  the journal, every 10 minutes by a full listing for a repository whose journal cannot be read,
  e.g. behind a proxy which does not expose it;
- a repository is listed in full again an hour after its entry was built, rather than when it
  crosses a UTC day, which bounds the drift from what the journal does not record. The
  `fullListingInterval` parameter of its URL sets this delay, in whole minutes; the XO 6 and XO 5
  repository forms now keep it when the repository is edited.

The archives are registered through `registerCollection` like any other collection, which drops
the REST API special case for them. Their events now carry an array of archives (`add`, `update`)
or of ids (`remove`); SSE subscribers still receive one event per archive.
2026-10-22 11:41:10 +02:00
Florent BEAUCHAMP
bc927fdffb fix(xo6): wrong ETA for task , show transferred size for backup and v2v tasks (#10622)
* feat(xo6): add size on task quick view
* feat(v2v): show transferred size in task
2026-10-21 13:46:00 +02:00
Joris K
0ebc92b50f feat(rest-api): add endpoint to plugins (#10588)
* feat(rest-api): add endpoint to plugins

* add changelog

* review

* mathieu's review

* remove patch endpoint

---------

Co-authored-by: MathieuRA <contact@mathieu-raisin.fr>
2026-10-21 11:25:06 +02:00
Florent BEAUCHAMP
57282c0457 feat(backup/incremental mirror): don't recompress block if the compression is the same on source and destination (#10581)
* feat(backup/incremental mirror): don't recompress block if the compression is the same on source and destination
2026-10-21 11:07:43 +02:00
Florent BEAUCHAMP
10208cbfe0 feat(vhd-lib): add fast custom compression removing only zero chunks (#10557)
typical performance of this filter is 1% cpu at 1GB/s, compression level is 20-40% size reduction depending on data
2026-10-20 15:56:20 +02:00
Florent BEAUCHAMP
6f5caa409c feat(backup): support zstd compression for vhd blocks (#10545)
XO-3133
2026-10-20 15:21:47 +02:00
vmpr
b630456835 fix(xo-server-transport-icinga2): send credentials via auth instead of URL (#10594)
Fixes #10498
Introduced by 3293e69cc2
2026-10-20 12:48:35 +02:00
MlssFrncJrg
c77d22f422 feat(xo-server): persist backup repository size on the remote object (#10406) 2026-10-20 09:48:00 +02:00
ayoub-el-kajji-v
d32c9879b1 fix(hosts): multipathing should not require disconnecting srs on local storage (#10592)
XO-2336
2026-10-19 16:07:07 +02:00
Pierre Donias
8ae4ea25b2 feat(netbox): support Netbox v4.7.x (#10574)
Fixes #10565
See https://github.com/netbox-community/netbox/releases
2026-10-19 09:21:11 +02:00
spacotte-vates
b7af59b6ed feat(events): improve xo5 event handling (#10568)
XO-3152

Improves XO5 event handling

Event improvements - Front end test.md

Event improvements - Performance impact.md
2026-10-16 16:38:04 +02:00
Mathieu
ff90a80e99 feat(rest-api): expose backup-log in the SSE (#10563)
* feat(rest-api): expose backup-log in the SSE

* noop instead undefined

* fix: handle sequance

* changelog

* fix

* final fix

* emit remove event from the gc

* Kilian's feedback

---------

Co-authored-by: Killian <killian.allegrain@vates.tech>
2026-10-16 10:59:12 +02:00
Florent BEAUCHAMP
a350c62cc3 feat(fs, backups): don't concatenate buffers but write them directly (#10538)
* feat(fs, backups): don't concatenate buffers but write them directly
maximum throughput with a perfect source and no write goes from
4.5 to 9.6GB/s

* fix: remove Buffer concat in qcow2 stream generationonly needed for last block
2026-10-16 10:57:00 +02:00
Florent BEAUCHAMP
bb5a79e6c6 feat(xo-server, xo-web): support insecure nbd (#10540)
* feat(nbd-client): support nbd insecure networks
* feat(xo-web): support insecure nbd

also add a confirm on insecure enabling
The dialog is titled "Enable insecure NBD?" and says: "The disk data of the backups will travel unencrypted on this network. Only enable it on a network dedicated to backups and isolated from the VMs and the users (dedicated VLAN or physical network)." Both texts are new entries in messages.js, and the dialog itself is a new confirmInsecureNbd() helper in xo/index.js.

It appears in two places:

Pool Network tab (tab-network.js):
The dialog only appears when switching a network to insecure NBD. Reselecting it on a network that already has it, or switching to "NBD" or "No NBD", doesn't ask.
On cancel, nothing is sent and the drop-down keeps showing the network's current setting.
Network creation form (new/network/index.js):
The dialog appears on "Create" when insecure NBD is selected (bonded and private networks are never affected).
On cancel, the network isn't created and the form stays as is, with no error and no redirect.

* feat: update xo5,xo6 and lite ui for this settings

---------

Co-authored-by: MlssFrncJrg <119158464+MelissaFrncJrg@users.noreply.github.com>
2026-10-16 10:45:54 +02:00
Olivier Lambert
db5cb01fc9 fix(xo-server): cancel the disconnection grace period when the connection drops (#10577) 2026-10-15 16:15:00 +02:00
Bastien Nollet
0bb2f12b2b fix(xo-server): avoid sequence abort on error with proxy (#10504) 2026-10-14 12:30:05 +02:00
Florent BEAUCHAMP
f93bb67409 fix(xen-api): really throw import error while importing VM (#10551) 2026-10-13 17:13:44 +02:00
Pierre Donias
11335b465b fix(xo-web/self): fix removing a tag from a resource set (#10550)
Fixes Zammad#65918
2026-10-13 11:05:35 +02:00
Florent BEAUCHAMP
1c4890be10 fix(xo-cli): error when using output on a rest api query (#10541) 2026-10-12 16:59:56 +02:00
Pierre Donias
4abb9d80bc feat(xo-web/patches): warn when pool master is not up to date (#10523) 2026-10-12 16:24:18 +02:00
Sebastien Rodot
d451d5c35b feat(xo-server-sdn-controller): add unit tests
- check that objects listeners are properly attached/detached on Xapi connect/disconnect
- check that xapi instance doesn't leak on reconnect
2026-10-12 14:34:55 +02:00
Sebastien Rodot
375b9fe91b fix(xo-server-sdn-controller): avoid leaking listeners on disconnect
Objects listeners are added to Xapi objects by the sdn-controller plugin, but 
they are only removed at plugin `unload()` time.

Prefer to remove them at Xapi disconnect time.
2026-10-12 14:34:55 +02:00
Sebastien Rodot
d53294f15c fix(xo-server-sdn-controller): re-watch XAPI events after reconnect
When a pool's XAPI connection drops and reconnects, xo-server destroys the
old Xapi instance and creates a new one (same pool UUID, same XAPI object
$refs). The plugin tracked managed pools by pool UUID, so _manageXapi()
short-circuited on reconnect and never attached its add/update/remove
listeners to the new Xapi instance.

From then on the plugin was blind to XAPI events: re-applying VIF traffic
rules on VM start, handling VIF/PIF plug and star-center election all
stopped silently until the plugin was reloaded.

Track the managed Xapi instances instead of pool UUIDs, and drop a dead
instance on disconnect so its replacement is managed again.
2026-10-12 14:34:55 +02:00
Sebastien Rodot
40e5ca9a73 fix(xo-server-sdn-controller): recreate stale OpenFlow controllers
When a XAPI connection drops and reconnects, xo-server creates a new
Xapi instance while the XAPI objects (and their $refs) are kept. The
ofChannels cache still held the controllers of the previous
connection, so traffic rule add/delete calls were silently skipped
without reaching the host.

Rework _getOrCreateOfChannel() to key the cache on the Xapi instance:
entries from a previous connection are dropped and the controller is
recreated, concurrent calls share the same instantiation, and a
failed instantiation clears the cache.

Also drop the cached controller when the host is disabled or its XAPI
is not connected, so it is recreated as soon as it comes back.
2026-10-12 14:34:55 +02:00
ayoub-el-kajji-v
cf760d26cd feat(backup): support ndb through http proxy (#10544) 2026-10-12 11:23:29 +02:00
Mathieu
1a012bdd94 fix(web-core/web): handle SSE for non XAPI objects (#10450) 2026-10-08 09:15:10 +02:00
Killian
0ff6196e72 feat(xo-server/backups,rest-api): stream changes of the VM backup archives over SSE (#10472)
The cache now announces what a listing finds and what a journal replay
changes, as `add`, `update` and `remove` events carrying the archive and its
previous value, on an emitter the app exposes as `app.vmBackupArchives`. What
was last announced for a repository outlives its entry, so a repository read
again from scratch only announces what really changed. A repository which is
removed or disabled goes through the new `forgetVmBackupRepository()`, which
announces all its archives as removed. A listener which throws is logged and no
longer fails the listing.

The REST API adds `backup-archive` to the SSE collections. It is bound to
`app.vmBackupArchives` the way `task` is, and filtered by `backup-archive:read`
through the same path as every other non-XAPI collection.

Nothing polls the repositories: changes are pushed whenever any client lists a
repository. The first listing after a restart sends every archive it already
holds as `add`.

XO-2992
XO-2993
2026-10-07 11:58:55 +02:00
Bastien Nollet
2ee51a3694 fix(load-balancer): process tags in each pool separately & other fixes 2026-10-07 11:25:38 +02:00
Bastien Nollet
87aca3ff5e feat(load-balancer): smarter migration restrictions 2026-10-07 11:25:38 +02:00
Bastien Nollet
305e66becc feat(load-balancer): vm-to-host affinity 2026-10-07 11:25:38 +02:00
b-Nollet
d3fea1296d feat(load-balancer): various minor improvements 2026-10-07 11:25:38 +02:00
Pierre Donias
d6e6e963bf feat(xo-web/ip-pools): show IP format example (#10522) 2026-10-06 11:09:50 +02:00
MlssFrncJrg
0070c7f709 fix(xo-lite/XO6): exclude ISO SR guest tools from selector in VM creation (#10430) 2026-10-06 10:36:47 +02:00
Mathieu
a84584d24e feat(rest-api): POST acl-roles support list of privileges (#10470) 2026-10-06 10:21:35 +02:00
Elise-F
decc09117d feat: patch technical release (#10529) 2026-10-05 15:47:30 +02:00