-
Notifications
You must be signed in to change notification settings - Fork 1.2k
enhancement: add instance info as Libvirt metadata #11061
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
base: 4.20
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11061 +/- ##
============================================
- Coverage 16.15% 16.14% -0.01%
- Complexity 13273 13276 +3
============================================
Files 5657 5658 +1
Lines 497898 498173 +275
Branches 60374 60411 +37
============================================
+ Hits 80435 80447 +12
- Misses 408505 408762 +257
- Partials 8958 8964 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@blueorangutan package |
@harikrishna-patnala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13855 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13587)
|
6f67d73
to
3acf518
Compare
Description
This PR adds
<metadata>
section to the domain XML of the virtual machine.It is useful when the additional instance info is needed from within the compute host,
for example to use it with a monitoring exporter that would label the virtual machine with the additional information.
The method that generates the metadata object is defined in the
HypervisorGuruBase
class as protected, so it can be used in all its children classes. Currently I've only used it in theKVMGuru
because I do not have any other hypervisor kind to test this on.Additionally, some dead code that looks to be half-finished, was removed, namely
LibvirtVMDef.java:
public class MetadataDef
and the references to it. Kindly check this part, perhaps I accidentally remove something that was obscurely used by something.Fixes: #6695
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
The metadata has the following format:
How Has This Been Tested?
I specifically put an emphasis on compatibility with the previous versions, so having a mgmt server with this feature/agent without this feature and vice versa will not crash the VM startup.
These are the tests that I preformed:
Both the Mgmt servers and the Nodes contain this patch:
<cloudstack:resource_tags/>
<cloudstack:host_tags/>
<cloudstack:project uuid=""/>
Mgmt server contains the patch, the node does not contain the patch:
Mgmt server does not contain the patch, the host contains the patch:
How did you try to break this feature and the system with this change?
I specifically checked for the empty values in my tests: service offering without tags, no resource tags, no project etc as those look to be the most dangerous parts.
Plus, the code checks for null value everywhere, and uses "unknown" default value when null is occurred.