diff options
author | Gil Bregman <gbregman@il.ibm.com> | 2024-10-21 16:22:17 +0200 |
---|---|---|
committer | Gil Bregman <gbregman@il.ibm.com> | 2024-10-22 00:29:47 +0200 |
commit | dd4b357ce9785af85cb7760b90ababf5c23adcdd (patch) | |
tree | 10901f1397e635c51fc3f3e90e0a70018e1e90ee | |
parent | Merge pull request #60045 from AliMasarweh/wip-alimasa-notif-list-bucket (diff) | |
download | ceph-dd4b357ce9785af85cb7760b90ababf5c23adcdd.tar.xz ceph-dd4b357ce9785af85cb7760b90ababf5c23adcdd.zip |
python-common/ceph/deployment: Add namespace netmask parameters to nvmeof configuration
Fixes https://tracker.ceph.com/issues/68542
Signed-off-by: Gil Bregman <gbregman@il.ibm.com>
-rw-r--r-- | src/python-common/ceph/deployment/service_spec.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/python-common/ceph/deployment/service_spec.py b/src/python-common/ceph/deployment/service_spec.py index 459ab7df1a0..7002cd58947 100644 --- a/src/python-common/ceph/deployment/service_spec.py +++ b/src/python-common/ceph/deployment/service_spec.py @@ -1340,6 +1340,8 @@ class NvmeofServiceSpec(ServiceSpec): allowed_consecutive_spdk_ping_failures: Optional[int] = 1, spdk_ping_interval_in_seconds: Optional[float] = 2.0, ping_spdk_under_lock: Optional[bool] = False, + max_hosts_per_namespace: Optional[int] = 1, + max_namespaces_with_netmask: Optional[int] = 1000, server_key: Optional[str] = None, server_cert: Optional[str] = None, client_key: Optional[str] = None, @@ -1348,7 +1350,9 @@ class NvmeofServiceSpec(ServiceSpec): spdk_path: Optional[str] = None, tgt_path: Optional[str] = None, spdk_timeout: Optional[float] = 60.0, - spdk_log_level: Optional[str] = 'WARNING', + spdk_log_level: Optional[str] = '', + spdk_protocol_log_level: Optional[str] = 'WARNING', + spdk_log_file_dir: Optional[str] = '', rpc_socket_dir: Optional[str] = '/var/tmp/', rpc_socket_name: Optional[str] = 'spdk.sock', conn_retries: Optional[int] = 10, @@ -1368,6 +1372,7 @@ class NvmeofServiceSpec(ServiceSpec): log_directory: Optional[str] = '/var/log/ceph/', monitor_timeout: Optional[float] = 1.0, enable_monitor_client: bool = True, + monitor_client_log_file_dir: Optional[str] = '', placement: Optional[PlacementSpec] = None, unmanaged: bool = False, preview_only: bool = False, @@ -1416,6 +1421,10 @@ class NvmeofServiceSpec(ServiceSpec): self.omap_file_lock_retry_sleep_interval = omap_file_lock_retry_sleep_interval #: ``omap_file_update_reloads`` number of attempt to reload OMAP when it differs from local self.omap_file_update_reloads = omap_file_update_reloads + #: ``max_hosts_per_namespace`` max number of hosts per namespace + self.max_hosts_per_namespace = max_hosts_per_namespace + #: ``max_namespaces_with_netmask`` max number of namespaces which are not auto visible + self.max_namespaces_with_netmask = max_namespaces_with_netmask #: ``allowed_consecutive_spdk_ping_failures`` # of ping failures before aborting gateway self.allowed_consecutive_spdk_ping_failures = allowed_consecutive_spdk_ping_failures #: ``spdk_ping_interval_in_seconds`` sleep interval in seconds between SPDK pings @@ -1441,7 +1450,11 @@ class NvmeofServiceSpec(ServiceSpec): #: ``spdk_timeout`` SPDK connectivity timeout self.spdk_timeout = spdk_timeout #: ``spdk_log_level`` the SPDK log level - self.spdk_log_level = spdk_log_level or 'WARNING' + self.spdk_log_level = spdk_log_level + #: ``spdk_protocol_log_level`` the SPDK protocol log level + self.spdk_protocol_log_level = spdk_protocol_log_level or 'WARNING' + #: ``spdk_log_file_dir`` the SPDK log output file file directory + self.spdk_log_file_dir = spdk_log_file_dir #: ``rpc_socket_dir`` the SPDK RPC socket file directory self.rpc_socket_dir = rpc_socket_dir or '/var/tmp/' #: ``rpc_socket_name`` the SPDK RPC socket file name @@ -1478,6 +1491,8 @@ class NvmeofServiceSpec(ServiceSpec): self.monitor_timeout = monitor_timeout #: ``enable_monitor_client`` whether to connect to the ceph monitor or not self.enable_monitor_client = enable_monitor_client + #: ``monitor_client_log_file_dir`` the monitor client log output file file directory + self.monitor_client_log_file_dir = monitor_client_log_file_dir def get_port_start(self) -> List[int]: return [5500, 4420, 8009] @@ -1522,6 +1537,16 @@ class NvmeofServiceSpec(ServiceSpec): 'Invalid SPDK log level. Valid values are: ' 'DEBUG, INFO, WARNING, ERROR, NOTICE') + if self.spdk_protocol_log_level: + if self.spdk_protocol_log_level.lower() not in ['debug', + 'info', + 'warning', + 'error', + 'notice']: + raise SpecValidationError( + 'Invalid SPDK protocol log level. Valid values are: ' + 'DEBUG, INFO, WARNING, ERROR, NOTICE') + if ( self.spdk_ping_interval_in_seconds and self.spdk_ping_interval_in_seconds < 1.0 |