Make xcp-rrdp-cpu more robust#6418
Merged
Merged
Conversation
last-genius
approved these changes
Apr 11, 2025
lindig
approved these changes
Apr 11, 2025
Contributor
Would add this. Debug level is |
…wn races Note that this hostload metric is completely wrong, and we should probably drop it. But for now prevent it from introducing gaps in the entire host CPU graph: if an exception escapes here, then nothing else gets reported, because the host CPU, VM CPU and hostload metrics all get returned as a single list. An exception escaping from any prevents all the others from working too. Fixes: 9aa7dfc ("CP-43574: Add host load data source") Signed-off-by: Edwin Török <edwin.torok@cloud.com>
8e5fa03 to
a61816a
Compare
When this plugin was part of xcp-rrdd the shared memory protocol wasn't used for transfering data (it was transferred by direct function call). The shared memory protocol has a limitation that you need to declare a maximum size from the beginning, or carefully grow the file itself dynamically. We support max 1024 VMs/host, and if each one needs 5 pages, that'd be 20Mib/host, so always use that as the minimum number of pages. Fixes: b3ea092 ("IH-615: Move CPU-related data-source collection into a separate RRDD plugin") Signed-off-by: Edwin Török <edwin.torok@cloud.com>
Member
Author
|
In fact 1 page / VM is not enough, a VM with 32 vCPUs needs a bit more than 2, so 64 should fit in 5. Still only 20MiB/host to avoid the bug. Even with these 2 fixes there are still occasional gaps in the CPU graphs, so there are likely more bugs in the CPU plugin (other plugins don't have the gaps). |
robhoes
approved these changes
Apr 11, 2025
psafont
approved these changes
Apr 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, because I still need to test it.