Skip to content

Make xe warn about ignored command-line parameters - #7255

Open
shindere wants to merge 16 commits into
xapi-project:masterfrom
shindere:report-ignored-params
Open

Make xe warn about ignored command-line parameters#7255
shindere wants to merge 16 commits into
xapi-project:masterfrom
shindere:report-ignored-params

Conversation

@shindere

@shindere shindere commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Before this PR

As reported in this forum post,
a command like

$ xe sr-create name-label=my-iso-sr type=iso \
     device-config:location=192.0.2.1:/isos \
     other-config:auto-scan=true
<sr-uuid>

creates the SR, but neither acts on other-config:auto-scan nor reports that it
went ignored.

After this PR

This PR changes no behaviour until the report is explicitly switched on, by
setting report-ignored-params to warn in one of two ways:

  • Server-sidereport-ignored-params = warn in /etc/xapi.conf.
  • Client-sidereport-ignored-params=warn on the xe invocation, or once
    in XE_EXTRA_ARGS / ~/.xe.

A client-side value overrides the server-side one.

With reporting enabled, the command from the previous section writes one more
line:

Ignored parameter: other-config:auto-scan

The ignored parameters are reported on stderr, as diagnostic output usually is.
Because a successful command can have ignored parameters too, this breaks an
xe invariant — that a successful command writes nothing to stderr, which some
scripts rely on. That is why reporting is off by default.

The command's own output, on stdout, is unaffected.

*-list commands are also unchanged: they read every extra key=value as a
record filter (xe vm-list power-state=running), so an unrecognised one is
already a hard error, not an ignored parameter.

How it works

The report is built by tracking which parameters an xe command effectively
reads as it runs.

This is achieved by making the representation of the command line abstract. It
used to be a plain (string * string) list, read directly with List.assoc;
it is now Cli_args.t, whose entries are reachable only through the Cli_args
API. Each accessor — get, get_opt, exists, and so on — sets a used flag
on the entry it touched. After the command runs, Cli_args.unused lists the
parameters that were ignored.

Design choices

Complete over early. The report lists exactly what the command left unread,
so it cannot exist until the command has finished. A check before execution
(against the declared parameter lists in cli_frontend.ml) would catch some
mistakes ahead of any side effect, but only some — it cannot tell that
message-create reads the first of vm-uuid, host-uuid, sr-uuid,
pool-uuid present, so vm-uuid=X sr-uuid=Y silently drops sr-uuid. The
after-the-fact report is the price of catching every case.

Errors caught before the command runs — a command line that does not parse, an
unknown command, a missing required parameter — thus produce no report.

A mode rather than a switch. report-ignored-params takes off or warn
for now. A stricter error — exit non-zero when a parameter was ignored even
though the command itself succeeded — could be added later as a third value,
without a new setting or a rename, and without disturbing the off / warn
already written on command lines and in xapi.conf.

Injected parameters count as used. Some commands add filter parameters the
user never typed — VM selection, for instance, adds is-control-domain=false so
control domains are not matched. Those injected parameters are marked as used. A
parameter the user passed for the same key is not, so in a command that forces
it, is-control-domain=true is still reported as ignored.

progress is kept out of the report; force and multiple are not.
Framework keys — server, username, trace and the rest — are marked as
used: the command does not read them, but the framework does, so they are not
ignored. progress is a real command parameter, and strict accuracy would
report it when a command does not honour it. But it only controls display — a
progress the command does not honour costs nothing more than a missing
progress bar — so it stays out of the report. force and multiple change what
the command does, and a force or multiple the command ignores can mean the
user misunderstood it, so both stay in.

How to review

Best reviewed commit by commit.

1–3 — Cli_frontend tidy-ups. An interface for Cli_frontend — which also
documents parse_commandline's type change — plus a simpler parse_commandline
and removal of the dead rio_help. Unrelated to the feature; done first so they
stay out of the later diffs.

4–7 — preparation for commit 8. The parts of the parameter-handling code
that are not a straight substitution: params_except, override_param and
assoc_default_ci become helpers, and the vm_migrate options block is
rewritten. Isolating them here lets commit 8 be purely mechanical, with nothing
subtle folded in.

8 — route every parameter access through Cli_args. The largest diff, and a
pure mechanical substitution — no behaviour change. List.assoc "x" params
becomes Cli_args.get "x" params, and so on, across cli_operations.ml,
cli_frontend.ml and xapi_cli.ml. The type is abstract; op in cli_cmdtable
now carries string Cli_args.t instead of (string * string) list.

9–11 — map/set plumbing, still no behaviour change:

  • Cli_args.view: a lens onto the prefix:key=value map/set entries (and the
    old prefix-key=value form).
  • Cli_maps: one named view per map/set parameter, and the one place that lists
    them all.
  • an optional ~key for choose_params / select_fields, so vm_disk_list_aux
    stops rebuilding the parameter list just to rename vbd-params / vdi-params.

12 — track reads. Adds the used flag and the marking rules from Design
choices
. Wholesale consumers call Cli_args.consume. vm_migrate's parameter
aliasing switches to Cli_args.rename_key, which edits entries in place; the old
code round-tripped through to_pairs / from_pairs and lost the tracking.
Cli_args.unused is defined here but not yet called, so nothing observable
changes.

13 — unit tests for the tracking engine (ocaml/tests/test_cli_args.ml, in
suite_alcotest): which accessors mark, marking seen through a view or a derived
structure, prefix stripping, consume / mark_used / rename_key, and that
unused returns exactly the untouched keys.

14 — the report. report_ignored_params calls unused and prints, from a
finally around the command in do_rpcs, so it fires whether the command
succeeded or failed. Gated on report-ignored-params=warn on the invocation
(also settable via XE_EXTRA_ARGS / ~/.xe).

15 — add xapi.conf as a second place to switch it on. Adds the
report-ignored-params key to xapi.conf as a fallback, consulted only when the
parameter is absent from the invocation.

@shindere
shindere force-pushed the report-ignored-params branch from 0d92f07 to 1f68280 Compare September 7, 2026 10:26
Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
(* Return the list of k=v pairs for maps.
Works for key which is not follow by a ':',
also match old syntax 'device-config-key' for backwards compatability *)
(* The [(key, value)] contents of a map-valued parameter [name:key=value], as a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you forgot to remove this comment as well. It is not related to "get_chunks" if I'm not mistaken.

@psafont psafont left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent work, the cli code has accumulated a lot of technical debt and is it need of care, this provides quite a bit of it.

While most of my comments are small nits to reduce duplication, I'm worried about the misuse of Cli_args.to_pairs without an entry-marking function. This makes a leaky interface that makes mistakes easy to do, and so I think to_pairs should be removed from the interface.

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
@@ -134,18 +134,15 @@ let waiter printer rpc session_id params task =
Works for key which is not follow by a ':',
also match old syntax 'device-config-key' for backwards compatability *)
let read_map_params name params =
(* [name:key=value] pairs (also the legacy [name-key=value] form), with the
[name:] / [name-] prefix stripped. The contents of a map-valued parameter
are plain data, not tracked CLI arguments. *)
let len = String.length name + 1 in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth ensuring that the dropped character is : or -.

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
let pVS_uuid = try List.assoc "pvs-uuid" params with Not_found -> "" in
let name_label = Cli_args.get "name-label" params in
let name_description = Cli_args.get_default "name-description" params "" in
let pVS_uuid = try Cli_args.get "pvs-uuid" params with Not_found -> "" in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let pVS_uuid = try Cli_args.get "pvs-uuid" params with Not_found -> "" in
let pVS_uuid = try Cli_args.get_default "pvs-uuid" params "" in

Comment thread ocaml/xapi-cli-server/cli_args.ml Outdated
Comment on lines +78 to +79
let filter_out pred t =
{t with pairs= List.filter (fun (k, _) -> not (pred k)) t.pairs}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let filter_out pred t =
{t with pairs= List.filter (fun (k, _) -> not (pred k)) t.pairs}
let filter_out pred t = filter (Fun.negate pred) t

Comment thread ocaml/xapi-cli-server/cli_args.ml Outdated
Comment on lines 62 to 75
let get key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; e.value
| None ->
raise Not_found

let get_opt key t = List.assoc_opt key (visible t)
let get_opt key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; Some e.value
| None ->
None

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let get key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; e.value
| None ->
raise Not_found
let get_opt key t = List.assoc_opt key (visible t)
let get_opt key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; Some e.value
| None ->
None
let get_opt key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; Some e.value
| None ->
None
let get k t = match get_opt k t with Some v -> v | None -> raise Not_found

(I'm not sure whether the formatter will like the one-liner)

Comment thread ocaml/xapi-cli-server/cli_args.ml Outdated
Comment on lines +89 to +94
let exists key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; true
| None ->
false

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let exists key t =
match List.find_opt (fun (k, _) -> k = key) (visible t) with
| Some (_, e) ->
mark e ; true
| None ->
false
let exists key t = get_opt key t |> Option.is_some

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
(* Filter all the records *)
List.fold_left filter_records_on_fields all_recs
(Cli_args.to_pairs filter_params)
(Cli_args.to_pairs (Cli_args.consume filter_params))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this use of to_pairs be replaced by map_contents as well?

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
Comment on lines +6460 to +6461
|> Cli_args.consume
|> Cli_args.to_pairs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another map_contents.

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
Comment on lines +6877 to +6878
|> Cli_args.consume
|> Cli_args.to_pairs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another map_contents.

Comment thread ocaml/xapi-cli-server/cli_operations.ml Outdated
Comment on lines +6896 to +6897
|> Cli_args.consume
|> Cli_args.to_pairs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another map_contents.

(* What xe does with command-line parameters that the command never read.
Set from xapi.conf (see xapi_globs), read by the CLI server; lives here
because xapi-cli-server doesn't link xapi-globs. *)
type cli_report_ignored_parameters = Off | Warn

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help messages (cmd_help in cli_frontend and usage in newcli) should also be changed to mention the value off

@gthvn1 gthvn1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed all the commits. Lot of stuff there and a lot of details. Only one minor comment otherwise it looks good to me. Great cleanup and improvements! I was able to run tests as well but I didn't test on a real host.

@psafont psafont assigned psafont and unassigned psafont Sep 7, 2026
@shindere

shindere commented Sep 7, 2026 via email

Copy link
Copy Markdown
Contributor Author

@shindere
shindere force-pushed the report-ignored-params branch from 1f68280 to 0680fe7 Compare September 8, 2026 08:45
@psafont

psafont commented Sep 8, 2026

Copy link
Copy Markdown
Member

(1) logging and (2) passing the parameters to the commands themselves.
Do you have ideas how to tackle these two?

I would prefer having two specialized functions that at least have a particular name to warn against using it, unlike the general and seemlesly harmless to_pairs. Maybe for (1) a log_args, and for (2) a arguments_for_command

@shindere
shindere force-pushed the report-ignored-params branch from 0680fe7 to 44736a1 Compare September 8, 2026 12:11
@shindere

shindere commented Sep 8, 2026 via email

Copy link
Copy Markdown
Contributor Author

@shindere
shindere force-pushed the report-ignored-params branch 2 times, most recently from 1e006e5 to 3c42451 Compare September 8, 2026 15:28
@shindere

shindere commented Sep 8, 2026 via email

Copy link
Copy Markdown
Contributor Author

@shindere
shindere force-pushed the report-ignored-params branch 2 times, most recently from 7b549fe to aa21e09 Compare September 8, 2026 16:22
@shindere

shindere commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Maybe for (1) a log_args [...]

Done — Cli_args.log_args added and to_pairs removed from the interface; details in the thread on cli_operations.ml.

@psafont psafont left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@shindere

shindere commented Sep 9, 2026 via email

Copy link
Copy Markdown
Contributor Author

but before the terminating Exit so the client is still listening. On
success the Exit is sent afterwards; on failure it is the error path's
job. *)
Xapi_stdext_pervasives.Pervasiveext.finally run (fun () ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A command that aborts part-way has not read the parameters below its abort point, so they are still unmarked and get reported as "Ignored".
An example:

# xe vdi-create sr-uuid=00000000 name-label=disk1 virtual-size=8GiB type=user sm-config:foo=bar report-ignored-params=warn
Ignored parameter: type
Ignored parameter: sm-config:foo
The uuid you supplied was invalid.
type: SR
uuid: 00000000

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted, many thanks for having reported this -- I should have
documented it explicitly for the sake of clarity.

My understanding is that the current behaviour is correct, in the sense
that it just tells a user that a parameter that was given has actually
not been consumed, for whatever reason. Do you request a change either
in the code or in the documentation?

@shindere
shindere force-pushed the report-ignored-params branch from aa21e09 to c27357b Compare September 11, 2026 08:22
To better keep track of what the module exports and how this is
impacted by the changes to come.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
This function is called only once in the codebase, with a list which is non-empty by construction. As the first argument of the list is special (the name of the program), it is simpler not to add it to the list at all and to pass it along separately.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
It is used only to define cmd_help, whihc is better defined directly.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Preparatory commit for the upcoming Cli_args migration: express the
force/live/copy option handling with plain List.assoc_opt so the later
substitution to Cli_args accessors is 1:1 and mechanical.

No behaviour change: same validation (bool_of_string still names the
offending key on error), same canonicalisation to "true"/"false", same
ordering (compress first, then force, live, copy). Removes the local
comp2 and the Listext.map_assoc_with_key / restrict_with_default calls.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Five commands filter the command line down to "everything the framework
did not already handle" with an open-coded
  List.filter (fun (p, _) -> not (List.mem p (extra :: ... :: stdparams))) params
Collapse those into a single named helper. No behaviour change.

This is also the one place the later ignored-parameter tracking will need
to mark the remaining pairs as consumed.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Three commands prepend a synthetized key=value pair onto the command line
to override whatever value the user passed. Name that idiom so the
upcoming Cli_args migration has a single call shape to convert rather
than three open-coded list conses. No behaviour change.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
pif_reconfigure_ip and pif_reconfigure_ipv6 each defined an identical
local read_optional_case_insensitive. Lift it to a module-level
assoc_default_ci. No behaviour change.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Introduce Cli_args: a small abstraction over the association list of
key=value parameters parsed from an "xe" command line. Every parameter
access in the CLI server now goes through it (get / get_opt /
get_default / get_all / exists / add / remove / filter / filter_out /
keys), the type is abstract, and the command dispatch type (op in
cli_cmdtable) carries string Cli_args.t rather than a raw
(string * string) list.

This is purely structural: no observable behaviour change. It is the
seam through which a later commit will track which parameters a command
actually consumed and report the ones that were silently ignored.

Notable points:
- read_map_params keeps returning a plain (string * string) list, as on
  master: the contents of a map- or set-valued parameter are data, not
  tracked CLI arguments, so they are read out of the Cli_args.t rather
  than kept wrapped in it.
- select_vms / select_hosts / select_srs keep List.remove_assoc's
  first-occurrence semantics via Cli_args.remove.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Add Cli_args.view: [view prefix t] restricts a Cli_args.t to the entries
whose key is [prefix] followed by a separator (the prefix:key=value map
syntax, and the legacy prefix-key=value form), presenting those keys with
the prefix stripped. It is a lens: the entries are shared with the
structure the view is taken from, and the prefix:key entries stay in that
structure.

read_map_params / read_set_params are now one-liners over view, so the
contents of a map- or set-valued parameter reach the Cli_args accessors
rather than being extracted into a bare list. Commands that read
individual keys of a map (with_specified_database, with_database_vdi) now
use Cli_args.view + get/exists directly.

No behaviour change: view reproduces read_map_params' previous
filter-and-strip exactly.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Add Cli_maps: one named view constructor per map- or set-valued
parameter the CLI understands ([let other_config params = Cli_args.view
"other-config" params], etc.). It is the single place, in code, that
lists those parameter names, and it removes the repetition of the name
strings across cli_operations.ml.

read_map_params / read_set_params are dropped; their ~35 call sites now
read [Cli_args.to_pairs (Cli_maps.<name> params)] (or Cli_args.keys for
the one set-valued parameter, tags). No behaviour change.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
choose_params and select_fields hard-coded the parameter name "params".
vm_disk_list_aux worked around that by rebuilding the whole parameter
list with vbd-params / vdi-params renamed to params. Add an optional
~key argument instead and pass ~key:"vbd-params" / ~key:"vdi-params"
from vm_disk_list_aux; the rebuilds go away. No behaviour change.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Give each Cli_args entry a mutable [used] flag. Every value accessor
(get / get_opt / get_default / get_all / exists / assoc_default_ci) marks
the entries it touches. Entry records are shared through views, so
marking via a view is visible from the root. Cli_args.unused -- the keys
of entries nobody read -- is defined here but not called yet; nothing
reads [used], so there is no behaviour change. The report of ignored
parameters is a later commit.

Once reads are tracked, a bulk reader that returns the parameters as a
plain list without marking them is a trap: the command does consume those
parameters, yet the report still lists them as ignored. So the same
commit closes that hole. The interface now offers only marking ways to
take a parameter's contents out:

  - Cli_args.consume marks every visible entry; a set parameter is read
    as consume |> keys.
  - Cli_args.map_contents (consume then to_pairs) is the reader for a
    map/set parameter and for the "rest of the command line": the
    Cli_maps.* reads, params_except, the field filters of
    select_vms / *-list, and the option subsets forwarded by
    diagnostic_net_stats / host_crashdump_upload / host_bugreport_upload
    all go through it. assoc_default_ci, a case-insensitive get_default,
    moves into Cli_args alongside it.
  - Cli_args.log_args renders the "key=value ..." line for the command
    log, censoring the values it is told to; being diagnostic output it
    deliberately does not mark.

to_pairs, the unchecked reader, is no longer exposed by cli_args.mli.

override_param marks its synthesized entry (never a user parameter); the
CLI framework marks Cli_args.reserved in exec_command. vm_migrate renamed
host-uuid / host-name to host by round-tripping through to_pairs /
from_pairs, which rebuilt fresh entries and lost the tracking; it now
uses Cli_args.rename_key, which mutates the shared entry records in
place.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
Add test_cli_args.ml to the existing suite_alcotest: it exercises
Cli_args directly -- which accessors mark a parameter read, that marking
through a view or a derived structure reaches the original, that view
strips the prefix (and accepts the legacy dash separator), consume /
mark_used / rename_key, and that unused reports exactly the untouched
keys.

This covers the engine that produces the "ignored parameters" report,
not the xe command line end to end (which has no test harness in the
tree).

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
A scoped Cli_args.view matched an entry by checking only that its key
started with the view's prefix, then skipped one character as the
separator without looking at it. So view "other-config" also matched
"other-configuration", reading its bare key as "ration".

No command defines both a map view "foo" and a scalar parameter of the
shape "foo<x>bar" that this could divert, so nothing is mis-read today.
But it is fragile, and it costs the ignored-parameter report its
accuracy: a diverted key would be marked used along with the view and so
never reported as ignored.

Require the character after the prefix to be ':' or '-' -- the two
separators the map/set syntax uses, and what the view docstring already
says. This is the only behaviour change in the series; it removes just
the matches that were wrong. The preceding commits keep introducing
Cli_args.view and Cli_maps with no behaviour change.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
When an invocation carries report-ignored-params=warn -- passed on the
command line, via XE_EXTRA_ARGS, or in ~/.xe -- print one
"Ignored parameter: <key>" line on stderr for every parameter the
command never read. Cli_args.unused feeds a report_ignored_params
helper, called from a finally around the command so the report comes
out whether the command succeeds or fails. This surfaces the class of
bug where an API-side option is named on the command line, not wired
into the CLI, and silently dropped.

Off unless asked for: a successful xe command is expected to write
nothing to stderr, and some scripts rely on that.

stderr, not stdout, so data output is untouched. The forwarding (slave)
path leaves the report to the master, which holds the real read state.
Nothing is reported when the command line fails to parse, the command
is unknown, or a required parameter is missing: those are rejected
before the command runs.

report-ignored-params is a framework parameter, registered in two
lists: Cli_args.reserved, so "xe help" does not mistake it for a
command name and exec_command marks it consumed (it never reports
itself); and stdparams, which the list / select / event-wait commands
strip before treating the rest of the command line as filter fields.
Without the latter, a global report-ignored-params in ~/.xe would make
vm-list & co. fail with "Unknown field". force and multiple are left to
the per-command reads; trace and progress keep their exec_command
marking.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
…port

The previous commit enables the report per invocation
(report-ignored-params=warn). Add a second source for the same key:
xapi.conf, so an operator can turn the report on for every xe on a host
or pool at once, without touching each user's environment.

The command-line value wins; xapi.conf is only consulted when the key
is absent from the invocation. The mode is stored in a Constants ref
because xapi-cli-server does not link xapi-globs; xapi_globs wires the
config entry to it, exactly as it already does for use-event-next.

This commit is self-contained: reverting it leaves the per-invocation
control from the previous commit working.

Signed-off-by: Seb Hinderer <sebastien.hinderer@vates.tech>
@shindere
shindere force-pushed the report-ignored-params branch from c27357b to 0b2048c Compare September 11, 2026 17:21
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.

4 participants