Skip to content

Conversation

snwoods
Copy link
Contributor

@snwoods snwoods commented May 27, 2025

Currently, xapi-storage-script uses the presence/absence of a smapi observer config file to determine whether it should create traces. This only happens on startup which means smapiv3 traces will often not be created when they should be (e.g. if the smapi component is enabled after startup, tracing for smapiv3 will not be)

This commit updates the Smapi Observer forwarder to use an RPC client to send messages to xapi-storage-script, updating it on any relevant changes to the Observer. This is done in a generic way so that any future components could use also listen to this queue to call its own Observer functions.

Also move the Observer RPC declarations to a common file to reduce code duplication and make some debug logs more helpful.

snwoods added 2 commits May 27, 2025 11:22
Besides the errors, Xapi_cluster and Xenopsd use the exact same Observer
RPC definitions. Add a new Observer error (as the unique errors for
cluster/xenops are not applicable to the Observer functions anyway) and
use common code to remove this duplication.

Signed-off-by: Steven Woods <[email protected]>
@snwoods snwoods force-pushed the private/stevenwo/CA-409431 branch from 8e7ab20 to f63fbea Compare May 27, 2025 10:44
Currently, xapi-storage-script uses the presence/absence of a smapi
observer config file to determine whether it should create traces. This
only happens on startup which means smapiv3 traces will often not be
created when they should be.

This commit updates the Smapi Observer forwarder to use an RPC client to
send messages to xapi-storage-script, updating it on any relevant
changes to the Observer.

Signed-off-by: Steven Woods <[email protected]>
@snwoods snwoods force-pushed the private/stevenwo/CA-409431 branch from f63fbea to 4ab193a Compare May 27, 2025 10:49

let default_path = Filename.concat default_sockets_dir service_name

let uri () = "file:" ^ default_path
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan; how about using the URI module? There is always some confusion around the // part in file URLs.

@psafont psafont added this pull request to the merge queue Jun 16, 2025
Merged via the queue into xapi-project:master with commit a98bfc5 Jun 16, 2025
17 checks passed
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