Skip to content

CA-408841 rrd: don't call ds_update with an empty datasource array #6393

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

Merged

Conversation

last-genius
Copy link
Contributor

Several assumptions in the ds_update function expect at least one element to be present in the array, and will raise Invalid_argument("index out of bounds") otherwise. This could be triggered by disabling all datasources for a particular plugin/owner combination, for example.

@last-genius
Copy link
Contributor Author

I've tested manually and confirmed this fixes xcp-rrdd no longer working due to ds_update crashing when disabling all the datasources for a particular plugin/owner combination (e.g., all memory-related datasources for the control domain). Should hopefully also fix the WLB issues we've been seeing.

…ty datasource array

Several assumptions in the ds_update function expect at least one element to be
present in the array, and will raise Invalid_argument("index out of bounds")
otherwise. This could be triggered by disabling all datasources for a
particular plugin/owner combination, for example.

Signed-off-by: Andrii Sultanov <andrii.sultanov@cloud.com>
@lindig lindig marked this pull request as ready for review April 1, 2025 12:01
@last-genius
Copy link
Contributor Author

Should I merge this?

@psafont
Copy link
Member

psafont commented Apr 2, 2025

If you think it's ready :)

@robhoes
Copy link
Member

robhoes commented Apr 2, 2025

I think @BengangY was doing more testing, so I would like to hear his opinion.

@BengangY
Copy link
Contributor

BengangY commented Apr 2, 2025

I'm doing some testing on it (including manual and automatic). And I am testing if WLB, HA, SNMP, NRPE, etc all work well.

@last-genius
Copy link
Contributor Author

I'm doing some testing on it (including manual and automatic). And I am testing if WLB, HA, SNMP, NRPE, etc all work well.

Thank you!

@BengangY
Copy link
Contributor

BengangY commented Apr 3, 2025

I have finished the testing. The fix is going well. The PR can be merged. @last-genius

@last-genius last-genius added this pull request to the merge queue Apr 3, 2025
Merged via the queue into xapi-project:master with commit b5894f5 Apr 3, 2025
17 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.

5 participants