]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: make enable_monitor_client configurable for nvmeof 56791/head
authorAdam King <adking@redhat.com>
Tue, 9 Apr 2024 16:19:06 +0000 (12:19 -0400)
committerAdam King <adking@redhat.com>
Tue, 9 Apr 2024 16:19:06 +0000 (12:19 -0400)
Currently, the mon client work is not merged on main, but our
default nvmeof container will attempt to make use of it by default,
causing it to crash. This makes it configurable and defaults the
behavior to false. That can be changed once the work is actually
present in main.

Signed-off-by: Adam King <adking@redhat.com>
src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2
src/pybind/mgr/cephadm/tests/test_services.py
src/python-common/ceph/deployment/service_spec.py

index 41527956795affa29375cc1a0ff4b931ab173670..f2f994c5521183f53303fb7f3f926cf863cd876a 100644 (file)
@@ -19,6 +19,7 @@ omap_file_update_reloads = {{ spec.omap_file_update_reloads }}
 allowed_consecutive_spdk_ping_failures = {{ spec.allowed_consecutive_spdk_ping_failures }}
 spdk_ping_interval_in_seconds = {{ spec.spdk_ping_interval_in_seconds }}
 ping_spdk_under_lock = {{ spec.ping_spdk_under_lock }}
+enable_monitor_client = {{ spec.enable_monitor_client }}
 
 [gateway-logs]
 log_level = {{ spec.log_level }}
index 3b66e75682fb9224b6a45545217d9241bb17fd8e..b62cc68a6a5c2b79e8d376ce3b5a178461ee4786 100644 (file)
@@ -404,6 +404,7 @@ omap_file_update_reloads = 10
 allowed_consecutive_spdk_ping_failures = 1
 spdk_ping_interval_in_seconds = 2.0
 ping_spdk_under_lock = False
+enable_monitor_client = False
 
 [gateway-logs]
 log_level = INFO
index 87f19f765b943624b1e500cb3c198d75bf6c38cd..4858585d79e205d7548a998662bc664409043733 100644 (file)
@@ -1352,6 +1352,7 @@ class NvmeofServiceSpec(ServiceSpec):
                  max_log_directory_backups: Optional[int] = 10,
                  log_directory: Optional[str] = '/var/log/ceph/',
                  monitor_timeout: Optional[float] = 1.0,
+                 enable_monitor_client: bool = False,
                  placement: Optional[PlacementSpec] = None,
                  unmanaged: bool = False,
                  preview_only: bool = False,
@@ -1454,6 +1455,8 @@ class NvmeofServiceSpec(ServiceSpec):
         self.log_directory = log_directory or '/var/log/ceph/'
         #: ``monitor_timeout`` monitor connectivity timeout
         self.monitor_timeout = monitor_timeout
+        #: ``enable_monitor_client`` whether to connect to the ceph monitor or not
+        self.enable_monitor_client = enable_monitor_client
 
     def get_port_start(self) -> List[int]:
         return [5500, 4420, 8009]