]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/nvmeof: Add SPDK iobuf options field to NVMeOF configuration 61412/head
authorGil Bregman <gbregman@il.ibm.com>
Thu, 16 Jan 2025 12:21:33 +0000 (14:21 +0200)
committerGil Bregman <gbregman@il.ibm.com>
Thu, 16 Jan 2025 16:48:28 +0000 (18:48 +0200)
Fixes https://tracker.ceph.com/issues/69554

Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
src/pybind/mgr/cephadm/services/nvmeof.py
src/pybind/mgr/cephadm/templates/services/nvmeof/ceph-nvmeof.conf.j2
src/python-common/ceph/deployment/service_spec.py

index b3fd526815e42c0c8e0657ad2764f29f918a56dc..8acec94f3829c05b4b5e88f268f57f97e8d357ba 100644 (file)
@@ -47,6 +47,7 @@ class NvmeofService(CephService):
 
         # TODO: check if we can force jinja2 to generate dicts with double quotes instead of using json.dumps
         transport_tcp_options = json.dumps(spec.transport_tcp_options) if spec.transport_tcp_options else None
+        iobuf_options = json.dumps(spec.iobuf_options) if spec.iobuf_options else None
         name = '{}.{}'.format(utils.name_to_config_section('nvmeof'), nvmeof_gw_id)
         rados_id = name[len('client.'):] if name.startswith('client.') else name
 
@@ -67,6 +68,7 @@ class NvmeofService(CephService):
             'rpc_socket_dir': '/var/tmp/',
             'rpc_socket_name': 'spdk.sock',
             'transport_tcp_options': transport_tcp_options,
+            'iobuf_options': iobuf_options,
             'rados_id': rados_id
         }
         gw_conf = self.mgr.template.render('services/nvmeof/ceph-nvmeof.conf.j2', context)
index 37f2db52732950c8a635cbdf5fe00ead5a1c67e2..2a9ab309568898f98a720c8017710d3d03bdbf6c 100644 (file)
@@ -86,6 +86,9 @@ transport_tcp_options = {{ transport_tcp_options }}
 {% if spec.tgt_cmd_extra_args %}
 tgt_cmd_extra_args = {{ spec.tgt_cmd_extra_args }}
 {% endif %}
+{% if iobuf_options %}
+iobuf_options = {{ iobuf_options }}
+{% endif %}
 
 [monitor]
 timeout = {{ spec.monitor_timeout }}
index 1ac9fa49e32e7c2fe38f2f8ec255845624fe49fd..6869d5b2188b29905920e646d89d5861c9a6a022 100644 (file)
@@ -1384,6 +1384,7 @@ class NvmeofServiceSpec(ServiceSpec):
                  transport_tcp_options: Optional[Dict[str, int]] =
                  {"in_capsule_data_size": 8192, "max_io_qpairs_per_ctrlr": 7},
                  tgt_cmd_extra_args: Optional[str] = None,
+                 iobuf_options: Optional[Dict[str, int]] = None,
                  discovery_addr: Optional[str] = None,
                  discovery_addr_map: Optional[Dict[str, str]] = None,
                  discovery_port: Optional[int] = None,
@@ -1520,6 +1521,8 @@ class NvmeofServiceSpec(ServiceSpec):
         self.transport_tcp_options: Optional[Dict[str, int]] = transport_tcp_options
         #: ``tgt_cmd_extra_args`` extra arguments for the nvmf_tgt process
         self.tgt_cmd_extra_args = tgt_cmd_extra_args
+        #: List of extra arguments for SPDK iobuf in the form opt=value
+        self.iobuf_options: Optional[Dict[str, int]] = iobuf_options
         #: ``discovery_addr`` address of the discovery service
         self.discovery_addr = discovery_addr
         #: ``discovery_addr_map`` per node address map of the discovery service