From: Redouane Kachach Date: Tue, 15 Oct 2024 11:34:32 +0000 (+0200) Subject: mgr/cephadm: disabling nginx buffering for grafana location X-Git-Tag: v20.0.0~824^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3ab5d1f67f1cac210f4c7f0540900670c25de80b;p=ceph.git 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 --- 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;