From 3276471ff765b0118105a7820a13d9e5efa9934b 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 --- .../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 41527956795af..f2f994c552118 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 3b66e75682fb9..b62cc68a6a5c2 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -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 diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index 87f19f765b943..4858585d79e20 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -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] -- 2.39.5