-
Notifications
You must be signed in to change notification settings - Fork 285
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
base: master
Are you sure you want to change the base?
CA-400860: rrdp-netdev - drop xenctrl, use xenstore to get UUIDs from domids instead #6068
Conversation
(Printf.sprintf "Failed to find uuid corresponding to domid: %d" domid) | ||
in | ||
uuid | ||
let uuid_of_domid domid = |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
… domids instead Signed-off-by: Andrii Sultanov <[email protected]>
537904f
to
1bdb22a
Compare
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.