From: Gil Bregman Date: Mon, 21 Oct 2024 14:23:22 +0000 (+0300) Subject: mgr/cephadm: Add namespace netmask parameters to nvmeof configuration X-Git-Tag: v20.0.0~779^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0dcc207194b76bd9f88745cca0beb86fa6f70b4d;p=ceph.git mgr/cephadm: Add namespace netmask parameters to nvmeof configuration Fixes https://tracker.ceph.com/issues/68542 Signed-off-by: Gil Bregman --- diff --git a/src/pybind/mgr/cephadm/services/nvmeof.py b/src/pybind/mgr/cephadm/services/nvmeof.py index 162815da24c73..4451e29878db0 100644 --- a/src/pybind/mgr/cephadm/services/nvmeof.py +++ b/src/pybind/mgr/cephadm/services/nvmeof.py @@ -55,7 +55,7 @@ class NvmeofService(CephService): 'addr': addr, 'discovery_addr': discovery_addr, 'port': spec.port, - 'spdk_log_level': 'WARNING', + 'spdk_log_level': '', 'rpc_socket_dir': '/var/tmp/', 'rpc_socket_name': 'spdk.sock', 'transport_tcp_options': transport_tcp_options, 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 dbe29004771ad..760bc97e51539 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 @@ -20,6 +20,8 @@ allowed_consecutive_spdk_ping_failures = {{ spec.allowed_consecutive_spdk_ping_f 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 }} +max_hosts_per_namespace = {{ spec.max_hosts_per_namespace }} +max_namespaces_with_netmask = {{ spec.max_namespaces_with_netmask }} [gateway-logs] log_level = {{ spec.log_level }} @@ -53,7 +55,15 @@ rpc_socket_dir = {{ spec.rpc_socket_dir }} rpc_socket_name = {{ spec.rpc_socket_name }} timeout = {{ spec.spdk_timeout }} bdevs_per_cluster = {{ spec.bdevs_per_cluster }} +{% if spec.spdk_log_level %} log_level = {{ spec.spdk_log_level }} +{% endif %} +{% if spec.spdk_protocol_log_level %} +protocol_log_level = {{ spec.spdk_protocol_log_level }} +{% endif %} +{% if spec.spdk_log_file_dir %} +log_file_dir = {{ spec.spdk_log_file_dir }} +{% endif %} conn_retries = {{ spec.conn_retries }} transports = {{ spec.transports }} {% if transport_tcp_options %} @@ -65,4 +75,7 @@ tgt_cmd_extra_args = {{ spec.tgt_cmd_extra_args }} [monitor] timeout = {{ spec.monitor_timeout }} +{% if spec.monitor_client_log_file_dir %} +log_file_dir = {{ spec.monitor_client_log_file_dir }} +{% endif %} diff --git a/src/pybind/mgr/cephadm/tests/test_services.py b/src/pybind/mgr/cephadm/tests/test_services.py index 4b11a588ad393..e82471c67cef0 100644 --- a/src/pybind/mgr/cephadm/tests/test_services.py +++ b/src/pybind/mgr/cephadm/tests/test_services.py @@ -409,6 +409,8 @@ allowed_consecutive_spdk_ping_failures = 1 spdk_ping_interval_in_seconds = 2.0 ping_spdk_under_lock = False enable_monitor_client = True +max_hosts_per_namespace = 1 +max_namespaces_with_netmask = 1000 [gateway-logs] log_level = INFO @@ -442,7 +444,7 @@ rpc_socket_dir = /var/tmp/ rpc_socket_name = spdk.sock timeout = 60.0 bdevs_per_cluster = 32 -log_level = WARNING +protocol_log_level = WARNING conn_retries = 10 transports = tcp transport_tcp_options = {{"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7}}