Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e815c5c
CA-420968: compute the amount of physical cores available on a NUMA n…
edwintorok Nov 26, 2025
ff659cf
CA-420968: ensure compatibility between NUMARequest.fits and plan
edwintorok Nov 27, 2025
3671ba0
CA-420968: track number of physical cores during a NUMA planning request
edwintorok Nov 26, 2025
5d32507
CA-420968: introduce an explicit name for the current NUMA policy: Pr…
edwintorok Nov 26, 2025
b097854
CA-420968: avoid large performance hit on small NUMA nodes
edwintorok Nov 26, 2025
2dbbbd0
[doc] add missing command to xs-trace
gthvn1 Nov 27, 2025
2809d72
numa_placement: use Seq instead of List
psafont Jun 19, 2025
98d5077
CA-419908: Move module Watcher ahead for future use in module VM
minglumlu Nov 28, 2025
19e5c07
s/xe-syslog-reconfigure: Keep disclaimer in remote.conf
rzr Nov 28, 2025
77c57b6
ocaml/xapi: remove unused xmlrpc_sexpr module
psafont Nov 28, 2025
36f2a47
ocaml/libs/http-lib: remove unused mime module
psafont Nov 28, 2025
5b5631c
ocaml: reduce and guard all users of Pool.get_all |> List.hd
psafont Nov 28, 2025
4906a4a
ocaml: reduce number of problematic List.hd (#6776)
psafont Dec 1, 2025
4254507
s/xe-syslog-reconfigure: Keep disclaimer in remote.conf (#6774)
lindig Dec 1, 2025
6967983
CA-419908: Update xenstore watcher to refresh domains when VM is renamed
minglumlu Nov 28, 2025
1b7f149
Refactor IntMap to use built-in Int module in Map.Make
minglumlu Dec 1, 2025
279f707
CA-419908: Update xenstore watcher to refresh domains when VM is rena…
minglumlu Dec 1, 2025
c1b1311
CP-309847: Make HTTP/80 configurable
Nov 26, 2025
62f962b
CP-309847: Make HTTP/80 configurable (#6770)
liulinC Dec 2, 2025
28eeaea
CA-420968: avoid large performance hit on small NUMA nodes (#6763)
edwintorok Dec 2, 2025
c57e943
numa_placement: use Seq instead of List (#6772)
edwintorok Dec 2, 2025
4da3c01
CP-31566 define xenopsd fast resume operation
robhoes Feb 24, 2023
88ece89
fixup! CP-31566 define xenopsd fast resume operation
lindig Dec 2, 2025
f255a46
increase max supported NVMe request size
lindig Dec 3, 2025
68a7737
increase max supported NVMe request size (#6783)
lindig Dec 4, 2025
58f09ac
CP-31566 define xenopsd fast resume operation (#6780)
lindig Dec 4, 2025
bf984c0
[doc] add missing command to xs-trace (#6771)
psafont Dec 5, 2025
f905d64
CA-420533: Only clear RestartVM guidance on up-to-date hosts
gangj Dec 3, 2025
fb2a1ab
CA-420533: Only clear RestartVM guidance on up-to-date hosts (#6782)
gangj Dec 5, 2025
bb705d1
qcow-stream-tool: Add read_headers command
last-genius Nov 18, 2025
5ec13cc
python3: Use pre-parsed cluster allocation data in qcow2-to-stdout
last-genius Nov 18, 2025
15f8088
vhd_tool_wrapper: Make vhd_of_device generic
last-genius Nov 18, 2025
3685968
qcow_tool_wrapper: Read headers of QCOW2-backed VDIs on export
last-genius Nov 18, 2025
8914076
qcow_tool_wrapper: Implement parse_header to determine allocated clus…
last-genius Nov 26, 2025
3387a72
qcow: Only process allocated clusters on export from raw (#6769)
last-genius Dec 8, 2025
dcc6219
Merge master into feature/config-ntp-timezone-maxcstate
changlei-li Dec 10, 2025
fe45173
Update lifecycle
changlei-li Dec 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions doc/content/toolstack/features/Tracing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,17 @@ and also assist newcomers in onboarding to the project.

By default, traces are generated locally in the `/var/log/dt` directory. You can copy or forward
these traces to another location or endpoint using the `xs-trace` tool. For example, if you have
a *Jaeger* server running locally, you can run:
a *Jaeger* server running locally, you can copy a trace to an endpoint by running:

```sh
xs-trace /var/log/dt/ http://127.0.0.1:9411/api/v2/spans
xs-trace cp /var/log/dt/ http://127.0.0.1:9411/api/v2/spans
```

You will then be able to visualize the traces in Jaeger.

The `xs-trace` tool also supports trace files in `.ndjson` and compressed `.zst` formats, so
you can copy or forward these files directly as well.

### Tagging Trace Sessions for Easier Search

#### Specific attributes
Expand Down
9 changes: 9 additions & 0 deletions ocaml/idl/datamodel_host.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,14 @@ let create_params =
; param_release= numbered_release "25.32.0-next"
; param_default= Some (VMap [])
}
; {
param_type= Bool
; param_name= "https_only"
; param_doc=
"updates firewall to open or close port 80 depending on the value"
; param_release= numbered_release "25.38.0-next"
; param_default= Some (VBool false)
}
]

let create =
Expand All @@ -1416,6 +1424,7 @@ let create =
--console_idle_timeout --ssh_auto_mode options to allow them to be \
configured for new host"
)
; (Changed, "25.38.0-next", "Added --https_only to disable http")
]
~versioned_params:create_params ~doc:"Create a new host record"
~result:(Ref _host, "Reference to the newly created host object.")
Expand Down
24 changes: 12 additions & 12 deletions ocaml/idl/datamodel_lifecycle.ml
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ let prototyped_of_field = function
| "SM", "host_pending_features" ->
Some "24.37.0"
| "host", "timezone" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "ntp_custom_servers" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "ntp_mode" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "secure_boot" ->
Some "25.31.0"
| "host", "max_cstate" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "ssh_auto_mode" ->
Some "25.27.0"
| "host", "console_idle_timeout" ->
Expand Down Expand Up @@ -234,21 +234,21 @@ let prototyped_of_message = function
| "VTPM", "create" ->
Some "22.26.0"
| "host", "set_servertime" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "get_ntp_synchronized" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "list_timezones" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "set_timezone" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "get_ntp_servers_status" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "set_ntp_custom_servers" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "set_ntp_mode" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "set_max_cstate" ->
Some "25.37.0-next"
Some "25.39.0-next"
| "host", "update_firewalld_service_status" ->
Some "25.34.0"
| "host", "get_tracked_user_agents" ->
Expand Down
14 changes: 11 additions & 3 deletions ocaml/libs/ezxenstore/watch/ez_xenstore_watch.ml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ module Make (Debug : DEBUG) = struct
in
List.map fst (IntMap.bindings c)

let need_refresh_domains = Atomic.make false

let mark_refresh_domains () = Atomic.set need_refresh_domains true

let with_xc_and_xs f =
Xenctrl.with_intf (fun xc -> with_xs (fun xs -> f xc xs))

Expand Down Expand Up @@ -196,9 +200,13 @@ module Make (Debug : DEBUG) = struct
in

let process_one_watch c (path, _token) =
if path = _introduceDomain || path = _releaseDomain then
look_for_different_domains ()
else
if
Atomic.exchange need_refresh_domains false
|| path = _introduceDomain
|| path = _releaseDomain
then
look_for_different_domains () ;
if path <> _introduceDomain && path <> _releaseDomain then
Client.immediate c (fun h ->
let xs = Xs.ops h in
Actions.watch_fired xc xs path !domains !watches
Expand Down
57 changes: 0 additions & 57 deletions ocaml/libs/http-lib/mime.ml

This file was deleted.

22 changes: 0 additions & 22 deletions ocaml/libs/http-lib/mime.mli

This file was deleted.

4 changes: 4 additions & 0 deletions ocaml/qcow-stream-tool/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@
qcow-stream
cmdliner
unix
lwt.unix
lwt
qcow-types
yojson
)
)
69 changes: 62 additions & 7 deletions ocaml/qcow-stream-tool/qcow_stream_tool.ml
Original file line number Diff line number Diff line change
@@ -1,11 +1,53 @@
open Cmdliner

module Impl = struct
let stream_decode output =
Qcow_stream.stream_decode Unix.stdin output ;
`Ok ()

let read_headers qcow_path =
let open Lwt.Syntax in
let t =
let* fd = Lwt_unix.openfile qcow_path [Unix.O_RDONLY] 0 in
let* virtual_size, cluster_bits, _, data_cluster_map =
Qcow_stream.start_stream_decode fd
in
let clusters = Qcow_types.Cluster.Map.bindings data_cluster_map in
let clusters =
List.map
(fun (_, virt_address) ->
let ( >> ) = Int64.shift_right_logical in
let address =
Int64.to_int (virt_address >> Int32.to_int cluster_bits)
in
`Int address
)
clusters
in
let json =
`Assoc
[
("virtual_size", `Int (Int64.to_int virtual_size))
; ("cluster_bits", `Int (Int32.to_int cluster_bits))
; ("data_clusters", `List clusters)
]
in
let json_string = Yojson.to_string json in
let* () = Lwt_io.print json_string in
let* () = Lwt_io.flush Lwt_io.stdout in
Lwt.return_unit
in
Lwt_main.run t ; `Ok ()
end

module Cli = struct
open Cmdliner
let output default =
let doc = Printf.sprintf "Path to the output file." in
Arg.(value & pos 0 string default & info [] ~doc)

let input =
let doc = Printf.sprintf "Path to the input file." in
Arg.(required & pos 0 (some string) None & info [] ~doc)

let stream_decode_cmd =
let doc = "decode qcow2 formatted data from stdin and write a raw image" in
Expand All @@ -15,15 +57,28 @@ module Cli = struct
; `P "Decode qcow2 formatted data from stdin and write to a raw file."
]
in
let output default =
let doc = Printf.sprintf "Path to the output file." in
Arg.(value & pos 0 string default & info [] ~doc)
in
Cmd.v
(Cmd.info "stream_decode" ~doc ~man)
Term.(ret (const Impl.stream_decode $ output "test.raw"))

let main () = Cmd.eval stream_decode_cmd
let read_headers_cmd =
let doc =
"Determine allocated clusters by parsing qcow2 file at the provided \
path. Returns JSON like the following: {'virtual_size': X, \
'cluster_bits': Y, 'data_clusters': [1,2,3]}"
in
let man = [`S "DESCRIPTION"; `P doc] in
Cmd.v
(Cmd.info "read_headers" ~doc ~man)
Term.(ret (const Impl.read_headers $ input))

let cmds = [stream_decode_cmd; read_headers_cmd]
end

let () = exit (Cli.main ())
let info =
let doc = "minimal CLI for qcow-stream" in
Cmd.info "qcow-stream-tool" ~version:"1.0.0" ~doc

let () =
let cmd = Cmd.group info Cli.cmds in
exit (Cmd.eval cmd)
12 changes: 6 additions & 6 deletions ocaml/tests/common/test_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ let make_host ~__context ?(uuid = make_uuid ()) ?(name_label = "host")
?(last_software_update = Date.epoch) ?(last_update_hash = "")
?(ssh_enabled = true) ?(ssh_enabled_timeout = 0L) ?(ssh_expiry = Date.epoch)
?(console_idle_timeout = 0L) ?(ssh_auto_mode = false) ?(secure_boot = false)
() =
?(https_only = false) () =
let host =
Xapi_host.create ~__context ~uuid ~name_label ~name_description ~hostname
~address ~external_auth_type ~external_auth_service_name
Expand All @@ -184,6 +184,7 @@ let make_host ~__context ?(uuid = make_uuid ()) ?(name_label = "host")
~last_update_hash ~ssh_enabled ~ssh_enabled_timeout ~ssh_expiry
~console_idle_timeout ~ssh_auto_mode ~secure_boot
~software_version:(Xapi_globs.software_version ())
~https_only
in
Db.Host.set_cpu_info ~__context ~self:host ~value:default_cpu_info ;
host
Expand All @@ -194,15 +195,14 @@ let make_host2 ~__context ?(ref = Ref.make ()) ?(uuid = make_uuid ())
?(external_auth_type = "") ?(external_auth_service_name = "")
?(external_auth_configuration = []) ?(license_params = [])
?(edition = "free") ?(license_server = []) ?(local_cache_sr = Ref.null)
?(chipset_info = []) ?(ssl_legacy = false) () =
?(chipset_info = []) ?(ssl_legacy = false) ?(https_only = false) () =
let pool = Helpers.get_pool ~__context in
let tls_verification_enabled =
Db.Pool.get_tls_verification_enabled ~__context ~self:pool
in
Db.Host.create ~__context ~ref ~current_operations:[] ~allowed_operations:[]
~software_version:(Xapi_globs.software_version ())
~https_only:false ~enabled:false
~aPI_version_major:Datamodel_common.api_version_major
~enabled:false ~aPI_version_major:Datamodel_common.api_version_major
~aPI_version_minor:Datamodel_common.api_version_minor
~aPI_version_vendor:Datamodel_common.api_version_vendor
~aPI_version_vendor_implementation:
Expand All @@ -224,8 +224,8 @@ let make_host2 ~__context ?(ref = Ref.make ()) ?(uuid = make_uuid ())
~pending_guidances_recommended:[] ~pending_guidances_full:[]
~last_update_hash:"" ~ssh_enabled:true ~ssh_enabled_timeout:0L
~ssh_expiry:Date.epoch ~console_idle_timeout:0L ~ssh_auto_mode:false
~max_cstate:"" ~secure_boot:false ~ntp_mode:`Factory ~ntp_custom_servers:[]
~timezone:"UTC" ;
~secure_boot:false ~https_only ~max_cstate:"" ~ntp_mode:`Factory
~ntp_custom_servers:[] ~timezone:"UTC" ;
ref

let make_pif ~__context ~network ~host ?(device = "eth0")
Expand Down
8 changes: 4 additions & 4 deletions ocaml/tests/test_event.ml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ let event_next_test () =
let __context, _ = event_setup_common () in
let () = Xapi_event.register ~__context ~classes:["pool"] in
let wait_hdl = Delay.make () in
let pool = Db.Pool.get_all ~__context |> List.hd in
let pool = Helpers.get_pool ~__context in
let key = "event_next_test" in
( try Db.Pool.remove_from_other_config ~__context ~self:pool ~key
with _ -> ()
Expand Down Expand Up @@ -146,7 +146,7 @@ let event_next_test () =
let wait_for_pool_key __context key =
let token = ref "" in
let finished = ref false in
let pool = Db.Pool.get_all ~__context |> List.hd in
let pool = Helpers.get_pool ~__context in
while not !finished do
let events =
Xapi_event.from ~__context ~classes:["pool"] ~token:!token ~timeout:10.
Expand All @@ -160,7 +160,7 @@ let wait_for_pool_key __context key =
let event_from_test () =
let __context, _ = event_setup_common () in
let wait_hdl = Delay.make () in
let pool = Db.Pool.get_all ~__context |> List.hd in
let pool = Helpers.get_pool ~__context in
let key = "event_from_test" in
( try Db.Pool.remove_from_other_config ~__context ~self:pool ~key
with _ -> ()
Expand All @@ -180,7 +180,7 @@ let event_from_test () =

let event_from_parallel_test () =
let __context, _ = event_setup_common () in
let pool = Db.Pool.get_all ~__context |> List.hd in
let pool = Helpers.get_pool ~__context in
let key = "event_next_test" in
( try Db.Pool.remove_from_other_config ~__context ~self:pool ~key
with _ -> ()
Expand Down
2 changes: 1 addition & 1 deletion ocaml/tests/test_ha_vm_failover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ let setup ~__context {master; slaves; ha_host_failures_to_tolerate; cluster} =
let host = List.nth (Db.Host.get_all ~__context) i in
Test_common.make_cluster_host ~__context ~host () |> ignore
done ;
let pool = Db.Pool.get_all ~__context |> List.hd in
let pool = Helpers.get_pool ~__context in
Db.Pool.set_master ~__context ~self:pool ~value:master_ref ;
Db.Pool.set_ha_enabled ~__context ~self:pool ~value:true ;
Db.Pool.set_ha_host_failures_to_tolerate ~__context ~self:pool
Expand Down
Loading
Loading