Skip to content

Conversation

@aslafy-z
Copy link
Collaborator

@aslafy-z aslafy-z commented Nov 26, 2025

Fixes #2145

@aslafy-z aslafy-z requested a review from csatib02 November 26, 2025 17:40
@aslafy-z aslafy-z changed the title fix: gate default value handling in fluentd.monitorServiceMetrics fix: gate scheme default value handling in fluentd.monitorServiceMetrics Nov 26, 2025
@csatib02
Copy link
Member

I've just checked and this error is present in syslogng and fluentbit too.

Could you please move the guard at the very beginning of the function calls?

@aslafy-z aslafy-z force-pushed the fix/fluent-monitorServiceMetrics-nil-deref branch from aafd363 to b4f3f45 Compare November 26, 2025 19:14
@aslafy-z aslafy-z changed the title fix: gate scheme default value handling in fluentd.monitorServiceMetrics fix: gate default value handling for monitorServiceMetrics methods Nov 26, 2025
@aslafy-z aslafy-z force-pushed the fix/fluent-monitorServiceMetrics-nil-deref branch 2 times, most recently from 4e5ad46 to cf42c98 Compare November 26, 2025 19:17
@aslafy-z
Copy link
Collaborator Author

@csatib02 I applied the requested changes!

@aslafy-z aslafy-z changed the title fix: gate default value handling for monitorServiceMetrics methods fix: guard default value handling for monitorServiceMetrics methods Nov 26, 2025
@aslafy-z aslafy-z force-pushed the fix/fluent-monitorServiceMetrics-nil-deref branch from cf42c98 to 9466d81 Compare November 26, 2025 19:18
@csatib02
Copy link
Member

Thanks!

I suspect that the monitorBufferServiceMetrics() functions are also affected.

@aslafy-z aslafy-z changed the title fix: guard default value handling for monitorServiceMetrics methods fix: apply ServiceMonitor default values only when metrics are enabled Nov 27, 2025
@aslafy-z aslafy-z force-pushed the fix/fluent-monitorServiceMetrics-nil-deref branch from 9466d81 to 30602a1 Compare November 27, 2025 09:29
Signed-off-by: Zadkiel AHARONIAN <hello@zadkiel.fr>
@aslafy-z aslafy-z force-pushed the fix/fluent-monitorServiceMetrics-nil-deref branch from 30602a1 to 2452841 Compare November 27, 2025 09:32
@aslafy-z
Copy link
Collaborator Author

aslafy-z commented Nov 27, 2025

Good catch! I updated and rebased the PR! @csatib02

@csatib02 csatib02 merged commit d422f1a into master Nov 27, 2025
33 checks passed
@csatib02 csatib02 deleted the fix/fluent-monitorServiceMetrics-nil-deref branch November 27, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nil pointer dereference caused in 6.2.0 when bufferVolumeMetrics is unset

3 participants