From 50a93140d2082d593394d838ce9db8894689fac8 Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 9 Apr 2024 12:19:06 -0400 Subject: [PATCH] mgr/cephadm: make enable_monitor_client configurable for nvmeof 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 (cherry picked from commit 3276471ff765b0118105a7820a13d9e5efa9934b) --- .../mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 | 1 + src/pybind/mgr/cephadm/tests/test_services.py | 1 + src/python-common/ceph/deployment/service_spec.py | 3 +++ 3 files changed, 5 insertions(+) diff --git a/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 b/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 index 41527956795..f2f994c5521 100644 --- a/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 +++ b/src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2 @@ -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 }} diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 8037776912b..63819fb22ce 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -403,6 +403,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 diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index 77c72f17222..225f935a51f 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -1350,6 +1350,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, @@ -1452,6 +1453,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] -- 2.39.5