From: Nizamudeen A Date: Fri, 17 Oct 2025 03:36:20 +0000 (+0530) Subject: mgr/cephadm: update grafana conf for disconnected environment X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f9b7940e67fcc0f4bfb913ad545bd39e8e32c64;p=ceph-ci.git mgr/cephadm: update grafana conf for disconnected environment Resolves: rhbz#2346107 Fixes: https://tracker.ceph.com/issues/70070 Signed-off-by: Nizamudeen A (cherry picked from commit fb6dbbf11b73d4806df3f84906526355261e152d) (cherry picked from commit 3878143bfe199031972af42155696d2a85b92e2f) --- diff --git a/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 b/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 index c767baddbb7..8fce4e8d5fd 100644 --- a/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 +++ b/src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2 @@ -44,3 +44,9 @@ enable_login_token = false headers = Role:X-WEBAUTH-ROLE {% endif %} +[analytics] + check_for_updates = false + reporting_enabled = false +[plugins] + check_for_plugin_updates = false + public_key_retrieval_disabled = true diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 838ca73cc5d..2b8afc135fd 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -1898,7 +1898,13 @@ class TestMonitoring: whitelist = 1::4 headers_encoded = false enable_login_token = false - headers = Role:X-WEBAUTH-ROLE\n""").lstrip(), # noqa: W291 + headers = Role:X-WEBAUTH-ROLE + [analytics] + check_for_updates = false + reporting_enabled = false + [plugins] + check_for_plugin_updates = false + public_key_retrieval_disabled = true""").lstrip(), # noqa: W291 "provisioning/datasources/ceph-dashboard.yml": y, 'certs/cert_file': dedent(f""" # generated by cephadm\n{ceph_generated_cert}""").lstrip(), @@ -2041,7 +2047,13 @@ class TestMonitoring: disable_initial_admin_creation = true cookie_secure = true cookie_samesite = none - allow_embedding = true\n""").lstrip(), # noqa: W291 + allow_embedding = true + [analytics] + check_for_updates = false + reporting_enabled = false + [plugins] + check_for_plugin_updates = false + public_key_retrieval_disabled = true""").lstrip(), # noqa: W291 "provisioning/datasources/ceph-dashboard.yml": y, 'certs/cert_file': dedent(f""" # generated by cephadm\n{ceph_generated_cert}""").lstrip(), @@ -2133,7 +2145,13 @@ class TestMonitoring: disable_initial_admin_creation = true cookie_secure = true cookie_samesite = none - allow_embedding = true\n""").lstrip(), # noqa: W291 + allow_embedding = true + [analytics] + check_for_updates = false + reporting_enabled = false + [plugins] + check_for_plugin_updates = false + public_key_retrieval_disabled = true""").lstrip(), # noqa: W291 'provisioning/datasources/ceph-dashboard.yml': dedent(""" # This file is generated by cephadm. apiVersion: 1 @@ -2243,7 +2261,13 @@ class TestMonitoring: ' admin_password = secure\n' ' cookie_secure = true\n' ' cookie_samesite = none\n' - ' allow_embedding = true\n', + ' allow_embedding = true\n' + '[analytics]\n' + ' check_for_updates = false\n' + ' reporting_enabled = false\n' + '[plugins]\n' + ' check_for_plugin_updates = false\n' + ' public_key_retrieval_disabled = true', 'provisioning/datasources/ceph-dashboard.yml': "# This file is generated by cephadm.\n" "apiVersion: 1\n\n" @@ -2306,7 +2330,13 @@ class TestMonitoring: ' admin_password = secure\n' ' cookie_secure = true\n' ' cookie_samesite = none\n' - ' allow_embedding = true\n', + ' allow_embedding = true\n' + '[analytics]\n' + ' check_for_updates = false\n' + ' reporting_enabled = false\n' + '[plugins]\n' + ' check_for_plugin_updates = false\n' + ' public_key_retrieval_disabled = true', 'provisioning/datasources/ceph-dashboard.yml': "# This file is generated by cephadm.\n" "apiVersion: 1\n\n"