Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA-400860: rrdp-netdev - drop xenctrl, use xenstore to get UUIDs from domids instead #6068

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

last-genius
Copy link
Contributor

Follow-up to the fix we had to rush, dropping xenctrl entirely.

Tested with a Windows VM, the domain creation is picked up and network metrics are present for it, with correct UUIDs determined.

(Printf.sprintf "Failed to find uuid corresponding to domid: %d" domid)
in
uuid
let uuid_of_domid domid =
Copy link
Member

Choose a reason for hiding this comment

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

Are there any other plugins that use this pattern? They could share code in the plugin library that you added

Copy link
Member

Choose a reason for hiding this comment

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

xenops_helpers has the same function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, it's where i stole the function from. but xenops_helpers also converts strings to UUIDs, which I don't need.

xs.Xenstore.Xs.read (vm_dir ^ "/uuid")
)
with _ ->
failwith
Copy link
Contributor

Choose a reason for hiding this comment

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

let fail = Printf.ksprintf failwith (* somewhere at the top of the file *)

..
fail "Something %s" "a string"

Might want to log the exception to understand why this fails. I would use Filename.concat to construct the paths but it's a aesthetic choice.

Copy link
Member

Choose a reason for hiding this comment

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

This should be Xenstore.Path.concat or similar, since they are not filenames

@last-genius last-genius force-pushed the private/asultanov/rrdd-xenctrl-fix branch from 537904f to 1bdb22a Compare October 22, 2024 10:11
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