cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Add logs to `LibvirtComputingResource`'s metrics collection process

Open winterhazel opened this issue 1 year ago • 17 comments

Description

The class LibvirtComputingResource does not provide enough information about what is happening during the metrics collection process and contains some logs with formatting issues.

This PR refactors the metrics collection process while adding logs, and fixes some logs that contained problems.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [X] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [X] Minor

Screenshots (if appropriate):

How Has This Been Tested?

I manually verified the logs in the agent. Regarding the refactoring, I adapted the unit tests to a commit before the refactoring and verified that the metrics had the same values before and after the changes.

winterhazel avatar Jan 15 '24 17:01 winterhazel

Codecov Report

Attention: Patch coverage is 87.50000% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 15.29%. Comparing base (5433e77) to head (28e36d6). Report is 1 commits behind head on main.

Files Patch % Lines
...ervisor/kvm/resource/LibvirtComputingResource.java 89.09% 4 Missing and 8 partials :warning:
...isor/kvm/resource/LibvirtExtendedVmStatsEntry.java 77.77% 3 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##              main    #8511       +/-   ##
============================================
+ Coverage     4.25%   15.29%   +11.04%     
- Complexity       0    11550    +11550     
============================================
  Files          364     5426     +5062     
  Lines        29735   474491   +444756     
  Branches      5221    59953    +54732     
============================================
+ Hits          1264    72581    +71317     
- Misses       28328   393853   +365525     
- Partials       143     8057     +7914     
Flag Coverage Δ
uitests 4.25% <ø> (ø)
unittests 16.03% <87.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 15 '24 18:01 codecov[bot]

@blueorangutan package

DaanHoogland avatar Jan 16 '24 09:01 DaanHoogland

@DaanHoogland 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.

blueorangutan avatar Jan 16 '24 09:01 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8332

blueorangutan avatar Jan 16 '24 10:01 blueorangutan

@blueorangutan test alma8 kvm-alma8

DaanHoogland avatar Jan 16 '24 10:01 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (alma8 mgmt + kvm-alma8) has been kicked to run smoke tests

blueorangutan avatar Jan 16 '24 10:01 blueorangutan

[SF] Trillian test result (tid-8847) Environment: kvm-alma8 (x2), Advanced Networking with Mgmt server a8 Total time taken: 50681 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8511-t8847-kvm-alma8.zip Smoke tests completed. 121 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Jan 17 '24 01:01 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Feb 08 '24 13:02 github-actions[bot]

@blueorangutan package

winterhazel avatar Feb 13 '24 16:02 winterhazel

@winterhazel 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.

blueorangutan avatar Feb 13 '24 16:02 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8645

blueorangutan avatar Feb 13 '24 17:02 blueorangutan

@blueorangutan test

DaanHoogland avatar Feb 14 '24 09:02 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

blueorangutan avatar Feb 14 '24 09:02 blueorangutan

[SF] Trillian test result (tid-9204) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 46454 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8511-t9204-kvm-centos7.zip Smoke tests completed. 129 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Feb 14 '24 23:02 blueorangutan

@JoaoJandre can you approve as is? @winterhazel did you get some 3rd party testing on this?

DaanHoogland avatar Feb 15 '24 09:02 DaanHoogland

@DaanHoogland yes, some users have already tested these changes. I can try asking someone to post their results here.

Though, looking back at this PR, I think I may have overwhelmed the debug level with too many messages for this process, so I will adjust some of these logs first so we can also get feedback on this.

winterhazel avatar Feb 16 '24 15:02 winterhazel

@GutoVeronezi @JoaoJandre, I have made some changes in the logs, what do you guys think?

winterhazel avatar Feb 27 '24 18:02 winterhazel

@DaanHoogland yes, some users have already tested these changes. I can try asking someone to post their results here.

i think this is ready otherwise.

DaanHoogland avatar Feb 28 '24 07:02 DaanHoogland

@DaanHoogland yes, some users have already tested these changes. I can try asking someone to post their results here.

i think this is ready otherwise.

Okay, I asked @gpordeus to test the latest version of this PR. I would like to hear his thoughts on the logs before merging :)

winterhazel avatar Feb 28 '24 16:02 winterhazel

I ran this on my local lab and it seems to be working fine, with proper DEBUG and TRACE split. If there's anything to point out, I'd say that maybe the TRACE memory statistics log at 2024-02-28T18:17:27,575 should be on one line so it'd be easier to grep? What do you think, @winterhazel?

DEBUG level
2024-02-28T18:44:31,537 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-2:[]) (logid:be7bc94a) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:44:31,540 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Trying to get VM with name [v-28-VM].
2024-02-28T18:44:31,549 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,550 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [3] network interface(s) for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:44:31,557 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,557 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [2] disk(s) for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:44:31,560 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:44:31,560 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Retrieved statistics for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]: [{"cpuTime":76720000000,"diskReadIOs":6543.0,"diskReadKBs":174041.0,"diskWriteIOs":2571.0,"diskWriteKBs":260983.0,"networkReadKBs":115348.23828125,"networkWriteKBs":847.6865234375}].
2024-02-28T18:44:31,583 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Calculated metrics for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]: [{"cpuUtilization":0.0,"diskReadIOs":0.0,"diskReadKBs":0.0,"diskWriteIOs":0.0,"diskWriteKBs":0.0,"entityType":"vm","intFreeMemoryKBs":888484.0,"memoryKBs":1048576.0,"networkReadKBs":0.0,"networkWriteKBs":0.0,"numCPUs":1,"targetMemoryKBs":1048576.0}].
2024-02-28T18:44:31,583 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-2:[]) (logid:be7bc94a) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:44:31,585 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Trying to get VM with name [r-30-VM].
2024-02-28T18:44:31,593 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,597 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [3] network interface(s) for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:44:31,602 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,602 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [2] disk(s) for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:44:31,605 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:44:31,605 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Retrieved statistics for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]: [{"cpuTime":53550000000,"diskReadIOs":8789.0,"diskReadKBs":224117.0,"diskWriteIOs":4080.0,"diskWriteKBs":151843.0,"networkReadKBs":114122.0927734375,"networkWriteKBs":751.208984375}].
2024-02-28T18:44:31,610 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Calculated metrics for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]: [{"cpuUtilization":0.0,"diskReadIOs":0.0,"diskReadKBs":0.0,"diskWriteIOs":0.0,"diskWriteKBs":0.0,"entityType":"vm","intFreeMemoryKBs":124744.0,"memoryKBs":262144.0,"networkReadKBs":0.0,"networkWriteKBs":0.0,"numCPUs":1,"targetMemoryKBs":262144.0}].
2024-02-28T18:44:31,613 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-2:[]) (logid:be7bc94a) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:44:31,613 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Trying to get VM with name [i-2-29-VM].
2024-02-28T18:44:31,618 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,619 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [1] network interface(s) for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:44:31,623 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-2:[]) (logid:be7bc94a) Using informed label [hdc] for volume [null].
2024-02-28T18:44:31,628 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Found [2] disk(s) for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:44:31,630 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:44:31,630 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Retrieved statistics for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]: [{"cpuTime":93850000000,"diskReadIOs":14216.0,"diskReadKBs":15005.0,"diskWriteIOs":42.0,"diskWriteKBs":155.0,"networkReadKBs":6.3369140625,"networkWriteKBs":17.21875}].
2024-02-28T18:44:31,633 WARN  [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Couldn't retrieve free memory, returning -1.
2024-02-28T18:44:31,634 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-2:[]) (logid:be7bc94a) Calculated metrics for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]: [{"cpuUtilization":0.0,"diskReadIOs":0.0,"diskReadKBs":0.0,"diskWriteIOs":0.0,"diskWriteKBs":0.0,"entityType":"vm","intFreeMemoryKBs":-1.0,"memoryKBs":524288.0,"networkReadKBs":0.0,"networkWriteKBs":0.0,"numCPUs":1,"targetMemoryKBs":524288.0}].
TRACE level
2024-02-28T18:17:27,565 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-1:[]) (logid:f0618de0) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:17:27,566 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get VM with name [v-28-VM].
2024-02-28T18:17:27,566 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting CPU stats for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,566 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting network stats for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,568 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,569 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [3] network interface(s) for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,569 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting disk stats for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,571 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,571 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [2] disk(s) for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,573 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:17:27,573 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved statistics for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]: [{"cpuTime":63350000000,"diskReadIOs":6542.0,"diskReadKBs":174037.0,"diskWriteIOs":1877.0,"diskWriteKBs":256823.0,"networkReadKBs":115127.3349609375,"networkWriteKBs":727.4599609375}].
2024-02-28T18:17:27,573 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Writing VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]'s CPU and memory information into the metrics.
2024-02-28T18:17:27,573 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get free memory for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,575 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved memory statistics (information about tags can be found on the libvirt documentation): [{tag:6
val:524288
,tag:0
val:0
,tag:9
val:1709143611
,tag:7
val:105644
}].
2024-02-28T18:17:27,575 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Old stats exist for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]; therefore, the utilization will be calculated.
2024-02-28T18:17:27,575 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating CPU utilization for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,575 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating network utilization for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,575 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating disk utilization for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}].
2024-02-28T18:17:27,575 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculated metrics for VM [{"name":"v-28-VM","uuid":"dcfd12f7-3ad9-4baf-bf27-9d13691256d7"}]: [{"cpuUtilization":1.0634762379528082,"diskReadIOs":0.0,"diskReadKBs":0.0,"diskWriteIOs":34.0,"diskWriteKBs":252.0,"entityType":"vm","intFreeMemoryKBs":888484.0,"memoryKBs":1048576.0,"networkReadKBs":8.2197265625,"networkWriteKBs":4.412109375,"numCPUs":1,"targetMemoryKBs":1048576.0}].
2024-02-28T18:17:27,575 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-1:[]) (logid:f0618de0) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:17:27,576 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get VM with name [r-30-VM].
2024-02-28T18:17:27,576 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting CPU stats for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,576 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting network stats for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,578 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,579 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [3] network interface(s) for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,579 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting disk stats for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,581 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,582 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [2] disk(s) for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,583 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:17:27,583 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved statistics for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]: [{"cpuTime":44390000000,"diskReadIOs":8189.0,"diskReadKBs":210813.0,"diskWriteIOs":2290.0,"diskWriteKBs":137775.0,"networkReadKBs":113924.603515625,"networkWriteKBs":617.99609375}].
2024-02-28T18:17:27,584 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Writing VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]'s CPU and memory information into the metrics.
2024-02-28T18:17:27,584 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get free memory for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,586 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved memory statistics (information about tags can be found on the libvirt documentation): [{tag:6
2024-02-28T18:17:27,586 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Old stats exist for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]; therefore, the utilization will be calculated.
2024-02-28T18:17:27,586 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating CPU utilization for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,586 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating network utilization for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,586 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating disk utilization for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}].
2024-02-28T18:17:27,586 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculated metrics for VM [{"name":"r-30-VM","uuid":"62030daa-26a0-45bd-aa67-5ff289c24f78"}]: [{"cpuUtilization":0.9804736186123806,"diskReadIOs":305.0,"diskReadKBs":9680.0,"diskWriteIOs":86.0,"diskWriteKBs":528.0,"entityType":"vm","intFreeMemoryKBs":124744.0,"memoryKBs":262144.0,"networkReadKBs":7.5615234375,"networkWriteKBs":4.947265625,"numCPUs":1,"targetMemoryKBs":262144.0}].
2024-02-28T18:17:27,586 DEBUG [kvm.resource.LibvirtConnection] (agentRequest-Handler-1:[]) (logid:f0618de0) Looking for libvirtd connection at: qemu:///system
2024-02-28T18:17:27,586 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get VM with name [i-2-29-VM].
2024-02-28T18:17:27,587 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting CPU stats for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,587 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting network stats for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,589 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,589 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [1] network interface(s) for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,589 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Getting disk stats for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,591 DEBUG [kvm.resource.LibvirtVMDef] (agentRequest-Handler-1:[]) (logid:f0618de0) Using informed label [hdc] for volume [null].
2024-02-28T18:17:27,591 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Found [2] disk(s) for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,592 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Ignoring disk [<disk  device='cdrom' type='file'><driver name='qemu' type='raw' /><source file=''/><target dev='hdc' bus='ide'/></disk>] in VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]'s stats since its deviceType is [cdrom].
2024-02-28T18:17:27,592 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved statistics for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]: [{"cpuTime":36000000000,"diskReadIOs":14216.0,"diskReadKBs":15005.0,"diskWriteIOs":42.0,"diskWriteKBs":155.0,"networkReadKBs":4.1494140625,"networkWriteKBs":6.994140625}].
2024-02-28T18:17:27,593 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Writing VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]'s CPU and memory information into the metrics.
2024-02-28T18:17:27,593 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Trying to get free memory for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,594 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Retrieved memory statistics (information about tags can be found on the libvirt documentation): [{tag:6
2024-02-28T18:17:27,594 WARN  [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Couldn't retrieve free memory, returning -1.
2024-02-28T18:17:27,595 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Old stats exist for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]; therefore, the utilization will be calculated.
2024-02-28T18:17:27,595 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating CPU utilization for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,595 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating network utilization for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,595 TRACE [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculating disk utilization for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}].
2024-02-28T18:17:27,595 DEBUG [kvm.resource.LibvirtComputingResource] (agentRequest-Handler-1:[]) (logid:f0618de0) Calculated metrics for VM [{"name":"i-2-29-VM","uuid":"c87d40b1-644a-4063-bc83-ba357f6f71c2"}]: [{"cpuUtilization":3.590067479972077,"diskReadIOs":0.0,"diskReadKBs":0.0,"diskWriteIOs":0.0,"diskWriteKBs":0.0,"entityType":"vm","intFreeMemoryKBs":-1.0,"memoryKBs":524288.0,"networkReadKBs":0.041015625,"networkWriteKBs":0.41015625,"numCPUs":1,"targetMemoryKBs":524288.0}].

gpordeus avatar Feb 28 '24 18:02 gpordeus

@gpordeus thanks for testing. I will adjust the log you pointed out.

winterhazel avatar Feb 28 '24 19:02 winterhazel

@blueorangutan package

DaanHoogland avatar Mar 04 '24 08:03 DaanHoogland

@DaanHoogland 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.

blueorangutan avatar Mar 04 '24 08:03 blueorangutan

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8842

blueorangutan avatar Mar 04 '24 09:03 blueorangutan

@blueorangutan test

DaanHoogland avatar Mar 04 '24 11:03 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

blueorangutan avatar Mar 04 '24 11:03 blueorangutan

[SF] Trillian test result (tid-9379) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 44923 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8511-t9379-kvm-centos7.zip Smoke tests completed. 128 look OK, 1 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_list_cpvm_vm Failure 0.04 test_ssvm.py
test_04_cpvm_internals Failure 0.03 test_ssvm.py

blueorangutan avatar Mar 05 '24 00:03 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar May 30 '24 14:05 github-actions[bot]

@blueorangutan package

winterhazel avatar May 31 '24 12:05 winterhazel

@winterhazel 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.

blueorangutan avatar May 31 '24 12:05 blueorangutan