-
Notifications
You must be signed in to change notification settings - Fork 459
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
add libvirt nodeinfo datasource #1073
base: main
Are you sure you want to change the base?
Conversation
however tests aren't running right project wide and there will need to be a PR to address this
allow querying VM Host capabilities so that we can make decisions on what resources to deploy. This can be things like machine architecture, but possibly also to deploy VMs in a CPU topology manner
My bad, this appears to have been merged in #1042 - after I started the feature, before I pushed this PR. |
I've made this a draft until the issue #1074 is discussed |
See #1074 (comment) |
Ok, cool. Fyi, there's definitely some inappropriate usage of log.Fatal in here as well, ;) |
As discussed with @memetb in #1074: Looking at the virsh nodeinfo implementation, it is using virNodeGetInfo. cmdCapabilities is implemented with virConnectGetCapabilities. So, I think it make sense to separate them. The prefix could be host, or just nothing (I am leaning towards host). It also does not matter that the topology is not fully implemented, as long it is documented. |
09ed957
to
0856861
Compare
this is related to the conversation in issue dmacvicar#1074. The original implementation of nodeinfo (as released in PR dmacvicar#1042) has a bug - which may very well be easily fixed - however the current PR and branch specifically addressed that issue by calling virConnectGetCapabilities instead of virNodeGetInfo. Instead of doing this, a new feature "host_capabilities" is added, and the nodeinfo code is left unchanged (it may be addressed in a separate PR)
@dmacvicar I have updated this PR. As per comment commit 07478ac, I've rolled back any and all changes to nodeinfo and I'm leaving the bugs in there as an open issue to be fixed in a separate PR. With regards to naming, after looking at the naming of the library I have come to think that maybe we can altogether drop the Usage would look like so:
I have not added any documentation at all. This PR is still a WIP, please let me know about next steps. |
This feature allows querying the host machine's nodeinfo through the libvirt protocol.
This is useful for, among other things, obtaining the target machine's architecture to select a guest image.
Which will create the following output: