Skip to content

Conversation

PhilippMatthes
Copy link
Member

@PhilippMatthes PhilippMatthes commented Aug 21, 2025

This PR adds a capabilities client that automatically connects to libvirt and fetches capabilities of the hypervisors. The capabilities are mapped to a new v1alpha.CapabilitiesStatus struct, which is part of v1alpha.HypervisorStatus. As a starter, we export the cpu architecture, as well as the total number of cpus and memory over all numa cells.

I've also taken the freedom and removed the goconst linter. It produced two obvious false positives :)

@PhilippMatthes PhilippMatthes marked this pull request as ready for review August 21, 2025 11:16
@PhilippMatthes PhilippMatthes force-pushed the capabilities-self-discovery branch from 71ab1c2 to 20bac93 Compare August 21, 2025 15:50
@PhilippMatthes PhilippMatthes force-pushed the capabilities-self-discovery branch from 7125ba5 to cd8df3d Compare August 22, 2025 16:56
@notandy notandy self-requested a review August 22, 2025 17:21
Copy link
Contributor

@notandy notandy left a comment

Choose a reason for hiding this comment

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

works for me, although the memory looks a bit odd:

  Capabilities:
    Cpu Arch:  x86_64
    Cpus:      256
    Memory:    4227289164Ki

Which is probably ok I assume.

@PhilippMatthes
Copy link
Member Author

PhilippMatthes commented Aug 25, 2025

4227289164Ki should be about right with 4 numa cells with 1056822291 KiB each.

@PhilippMatthes PhilippMatthes requested a review from notandy August 25, 2025 05:40
@PhilippMatthes PhilippMatthes force-pushed the capabilities-self-discovery branch from f5d0945 to 9a4b272 Compare August 25, 2025 05:46
@notandy notandy merged commit 5fe9e7d into main Aug 25, 2025
7 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.

2 participants