From 3ab5d1f67f1cac210f4c7f0540900670c25de80b Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Tue, 15 Oct 2024 13:34:32 +0200 Subject: [PATCH] mgr/cephadm: disabling nginx buffering for grafana location Disabling Nginx buffering for Grafana, as it may lead to errors or delays while loading the main Grafana page, particularly when receiving JavaScript files. Fixes: https://tracker.ceph.com/issues/68315 Signed-off-by: Redouane Kachach --- .../templates/services/mgmt-gateway/external_server.conf.j2 | 1 + src/pybind/mgr/cephadm/tests/test_services.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/pybind/mgr/cephadm/templates/services/mgmt-gateway/external_server.conf.j2 b/src/pybind/mgr/cephadm/templates/services/mgmt-gateway/external_server.conf.j2 index b830034a7d4e9..91efa91a8d50f 100644 --- a/src/pybind/mgr/cephadm/templates/services/mgmt-gateway/external_server.conf.j2 +++ b/src/pybind/mgr/cephadm/templates/services/mgmt-gateway/external_server.conf.j2 @@ -113,6 +113,7 @@ server { # clear any Authorization header as Prometheus and Alertmanager are using basic-auth browser # will send this header if Grafana is running on the same node as one of those services proxy_set_header Authorization ""; + proxy_buffering off; {% if oauth2_proxy_url %} auth_request /oauth2/auth; error_page 401 = /oauth2/sign_in; diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index a05c87ce3c3a9..072f4bec554e1 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -3900,6 +3900,7 @@ class TestMgmtGateway: # clear any Authorization header as Prometheus and Alertmanager are using basic-auth browser # will send this header if Grafana is running on the same node as one of those services proxy_set_header Authorization ""; + proxy_buffering off; } location /prometheus { @@ -4171,6 +4172,7 @@ class TestMgmtGateway: # clear any Authorization header as Prometheus and Alertmanager are using basic-auth browser # will send this header if Grafana is running on the same node as one of those services proxy_set_header Authorization ""; + proxy_buffering off; auth_request /oauth2/auth; error_page 401 = /oauth2/sign_in; -- 2.39.5