]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/cephadm: update grafana conf for disconnected environment
authorNizamudeen A <nia@redhat.com>
Fri, 17 Oct 2025 03:36:20 +0000 (09:06 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 12 Nov 2025 05:08:43 +0000 (10:38 +0530)
Resolves: rhbz#2346107

Fixes: https://tracker.ceph.com/issues/70070
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit fb6dbbf11b73d4806df3f84906526355261e152d)
(cherry picked from commit 3878143bfe199031972af42155696d2a85b92e2f)

src/pybind/mgr/cephadm/templates/services/grafana/grafana.ini.j2
src/pybind/mgr/cephadm/tests/test_services.py

index c767baddbb7acafab6a5d899021e242a50625033..8fce4e8d5fd9bf137b0ecf76be9f9a1bc121e220 100644 (file)
@@ -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
index 838ca73cc5dd8298110ec30ff455716a5e3fb8dc..2b8afc135fd9b18ffb95eaefebc6f22f4ffcd9de 100644 (file)
@@ -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"