Skip to content

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

Merged
last-genius merged 1 commit into
xapi-project:masterfrom
last-genius:private/asultanov/CA-408841
Apr 3, 2025
Merged

CA-408841 rrd: don't call ds_update with an empty datasource array#6393
last-genius merged 1 commit into
xapi-project:masterfrom
last-genius:private/asultanov/CA-408841

Conversation

@last-genius
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread ocaml/libs/xapi-rrd/lib/rrd.ml Outdated
…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
Copy Markdown
Contributor Author

Should I merge this?

@psafont
Copy link
Copy Markdown
Member

psafont commented Apr 2, 2025

If you think it's ready :)

@robhoes
Copy link
Copy Markdown
Member

robhoes commented Apr 2, 2025

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

@BengangY
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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