Skip to content

Merge branch master into feature/lldp - #7217

Merged
changlei-li merged 25 commits into
xapi-project:feature/lldpfrom
changlei-li:private/changleli/sync-master
Aug 12, 2026
Merged

Merge branch master into feature/lldp#7217
changlei-li merged 25 commits into
xapi-project:feature/lldpfrom
changlei-li:private/changleli/sync-master

Conversation

@changlei-li

Copy link
Copy Markdown
Contributor

No description provided.

shindere and others added 25 commits July 17, 2026 12:26
Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
The handler took the VNC port from Db.Console.get_port, which is only
correct for the control domain's console. For guest VMs the live console
is provided by xenopsd and may be a TCP port or a Unix domain socket; the
database port is stale (often 0), so vncsnapshot got "Connection refused"
and the request failed with an HTTP 500.

Resolve the address with Console.address_of_console, the same lookup the
VNC proxy uses, and pass either 127.0.0.1::<port> or -unix <path> to
vncsnapshot accordingly. Respond 404 when the address cannot be found.

Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
Multiple Test SDK builds jobs failed recently.
This may be caused by hosted runner environments run systemd
services in a restricted contrainer state, blocking DBus
connections required by timedatectl.
Replace by linking the system zoneinfo to set the timezone.

Signed-off-by: Changlei Li <changlei.li@citrix.com>
)

Multiple Test SDK builds jobs failed recently.
This may be caused by hosted runner environments run systemd services in
a restricted contrainer state, blocking DBus connections required by
timedatectl.
Replace by linking the system zoneinfo to set the timezone.
The vncsnapshot http handler was returning a 500 error, owing to the
vncsnapshot binary being unable to locate the VNC server it was given.
This PR fixes this by looking up the VNC address from xenopsd, and adds
additional visibility when things fail.
Currently, the number of auto-registered callers is unbounded. This commit adds
a default bound of 100, after which the caller which hasn't made a request in
the longest time is evicted.

The number can be configured with xapi.conf key "max-auto-registered-callers".
Setting this number to 0 disables auto-registering, and setting it to a
negative value removes the cap.

Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
Registering every caller to the RRD is causing out-of-memory issues. We resolve
this by only publishing groups rather than individual callers - this also
allows users to define their own reporting groups based on their needs.

Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
In case of migration updating VGPU card requires changing both VGPU
and PCI records.
Part of this job in done in different machines (for instance VGPU
allocation needs to be done in destination host) and is done by
different processes (Xapi and Xenops).
Some updates causes executing a "import_metadata" operation that read
metadata while they are still changing so VGPU PCI address won't
match PCI address causing the migration to fail.
Currently the code causes old pci and new vgpu which causes the migration
to fail. Change order computing metadata causing new pci and old vgpu.
This does not cause issues as the infer_vgpu_map always get the new vgpu
from XAPI DB.

Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Ming Lu <ming.lu@citrix.com>
If STATE_DIR exists but is not empty, then globs for it in the form of
STATE_DIR/* and STATE_DIR/*/vdi-uuid will be passed in literal form, causing
errors like:

    cat: /etc/xensource/static-vdis-test/*/vdi-uuid: No such file or directory

Toggle nullglob instead, which turns the whole glob string empty and does not
enter the body of the loop iterating over the matches.

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
This PR addresses issues arising from unbounded, automatic caller
registration and reporting of every caller in the following ways:
- Impose a limit of 100 auto-registered callers, configurable with
xapi.conf key max-auto-registered-callers. A limit of 0 disables
auto-registering, and a negative limit is treated as unlimited.
- Only publish rrd datasources for groups (manually labelled callers),
rather than for individual callers.
- Publish a debug line with caller information whenever a rate limit is
triggered
pygrub_path and eliloader_path were unused, so just drop them

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
Signed-off-by: Christian Pardillo Laursen <christian.pardillolaursen@citrix.com>
This change adds a span whenever a call is rate limited.
This avoids an invocation of the Python interpeter for a really simple script.

No functional change intended - pygrub still runs in deprivileged mode.

Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
In case of migration updating VGPU card requires changing both VGPU and
PCI records.
Part of this job in done in different machines (for instance VGPU
allocation needs to be done in destination host) and is done by
different processes (Xapi and Xenops).
Some updates causes executing a "import_metadata" operation that read
metadata while they are still changing so VGPU PCI address won't match
PCI address causing the migration to fail.
Detect this condition and retry a bit later to avoid having such
corrupted states.
Reinstate the VDI.resize_online API that was removed in
31b22cc (CA-262059), so that
"xe vdi-resize online=true" can resize a VDI attached to a running VM.
resize_online shares the offline resize storage path (SM vdi_resize); the
online/offline distinction lives in xapi's allowed-operations checks, which
permit resize_online on an attached VDI only when the SM backend advertises
the VDI_RESIZE_ONLINE capability. It is then up to the backend to decide
whether it can satisfy the request and to fail with an appropriate error if
it cannot.

- datamodel: mark resize_online as published again
- message_forwarding: restore resize_online forwarding
- xapi_vdi: resize_online implementation; revert resize live-permission change
- tests: cover resize_online allowed/blocked by VDI_RESIZE_ONLINE feature and
  offline resize still blocked while attached

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Syms <mark.syms@citrix.com>
Address PR review feedback: rather than rewriting the resize_online
history to claim it was always present, extend the datamodel lifecycle
automaton so a Removed object can be Published again (reintroduced).

The resize_online lifecycle now records its true history (published at
rio, removed at inverness) and appends a fresh Published transition for
the reintroduction that re-enables online resize where the SR supports
it. Add a matching success case to the lifecycle creation tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Mark Syms <mark.syms@citrix.com>
* xapi_globs: pygrub_path and eliloader_path were unused, so just drop
them
* Drop `pygrub-wrapper` and move its logic to xenopsd
…ect#7211)

Reinstate the VDI.resize_online API that was removed in
31b22cc (CA-262059), so that "xe
vdi-resize online=true" can resize a VDI attached to a running VM.
resize_online shares the offline resize storage path (SM vdi_resize);
the online/offline distinction lives in xapi's allowed-operations
checks, which permit resize_online on an attached VDI only when the SM
backend advertises the VDI_RESIZE_ONLINE capability. It is then up to
the backend to decide whether it can satisfy the request and to fail
with an appropriate error if it cannot.

- datamodel: mark resize_online as published again
- message_forwarding: restore resize_online forwarding
- xapi_vdi: resize_online implementation; revert resize live-permission
change
- tests: cover resize_online allowed/blocked by VDI_RESIZE_ONLINE
feature and offline resize still blocked while attached
…i-project#7101)

The description of how to install a VM through the Xen API didmention
storage repositories but only in passing. This PR proposes to fully
introduce them before moving on to the installation of VMs.
Signed-off-by: Ming Lu <ming.lu@cloud.com>
…dir (xapi-project#7204)

If `STATE_DIR` exists but is not empty, then globs for it in the form of
`STATE_DIR/*` and `STATE_DIR/*/vdi-uuid` will be passed in literal form,
causing errors like:

cat: /etc/xensource/static-vdis-test/*/vdi-uuid: No such file or
directory

Toggle nullglob instead, which turns the whole glob string empty and
does not enter the body of the loop iterating over the matches.
@changlei-li

Copy link
Copy Markdown
Contributor Author
> git diff
diff --cc ocaml/idl/schematest.ml
index 69ff721c5,e559c7581..000000000
--- a/ocaml/idl/schematest.ml
+++ b/ocaml/idl/schematest.ml
@@@ -3,7 -3,7 +3,7 @@@ let hash x = Digest.string x |> Digest.
  (* BEWARE: if this changes, check that schema has been bumped accordingly in
     ocaml/idl/datamodel_common.ml, usually schema_minor_vsn *)

- let last_known_schema_hash = "e5bb3f3b53e89a81d7a7fcee7ead9efe"
 -let last_known_schema_hash = "812a94da8125fe0f145561522cb309f2"
++let last_known_schema_hash = "4f4145585a0be563e77b01220bf3f6af"

  let current_schema_hash : string =
    let open Datamodel_types in

@changlei-li
changlei-li merged commit 6bf77a6 into xapi-project:feature/lldp Aug 12, 2026
16 checks passed
@changlei-li
changlei-li deleted the private/changleli/sync-master branch August 12, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants