[XS] Change in ...nfs-ganesha[next]: monitoring: Guard per-export metrics behind Enable_Dynamic_Metrics
ofir vainshtein has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1260416?usp=email ) Change subject: monitoring: Guard per-export metrics behind Enable_Dynamic_Metrics ...................................................................... monitoring: Guard per-export metrics behind Enable_Dynamic_Metrics Commit 898d398a3e9b ("Fix: skip Prometheus inode metrics when FSAL reports unsupported values (CephFS)") moved update_export_mem() out of the enable_dynamic_metrics check in PrometheusExposer::server_thread(). When Enable_Metrics = true and Enable_Dynamic_Metrics = false, dynamic_metrics is never initialized, so scraping /metrics calls update_export_mem() -> dynamic_metrics_export_info() and dereferences a null dynamic_metrics pointer. Guard update_export_mem() behind enable_dynamic_metrics and return early from dynamic_metrics_export_info() when dynamic_metrics is null. Change-Id: Ie538d08986976dadb92d37ad4d1a6123c3ffe112 Signed-off-by: Ofir Vainshtein <ofirvins@google.com> --- M src/monitoring/dynamic_metrics.cc M src/monitoring/prometheus_exposer.cc 2 files changed, 5 insertions(+), 1 deletion(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/16/1260416/1 -- To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/1260416?usp=email To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-Change-Id: Ie538d08986976dadb92d37ad4d1a6123c3ffe112 Gerrit-Change-Number: 1260416 Gerrit-PatchSet: 1 Gerrit-Owner: ofir vainshtein <ofirvins@google.com>
participants (1)
-
ofir vainshtein (GerritHub)