Skip to content

Commit 367a849

Browse files
authored
Merge pull request ceph#57033 from gbregman/main
mgr/cephadm: Some changes to nvmeof conf file defaults
2 parents 8254cb5 + da2d088 commit 367a849

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

src/pybind/mgr/cephadm/tests/test_services.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ def test_nvmeof_config(self, _get_name, _run_cephadm, cephadm_module: CephadmOrc
397397
prometheus_exporter_ssl = False
398398
prometheus_port = 10008
399399
verify_nqns = True
400-
omap_file_lock_duration = 60
401-
omap_file_lock_retries = 15
402-
omap_file_lock_retry_sleep_interval = 5
400+
omap_file_lock_duration = 20
401+
omap_file_lock_retries = 30
402+
omap_file_lock_retry_sleep_interval = 1.0
403403
omap_file_update_reloads = 10
404404
allowed_consecutive_spdk_ping_failures = 1
405405
spdk_ping_interval_in_seconds = 2.0

src/python-common/ceph/deployment/service_spec.py

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,9 +1317,9 @@ def __init__(self,
13171317
state_update_notify: Optional[bool] = True,
13181318
state_update_interval_sec: Optional[int] = 5,
13191319
enable_spdk_discovery_controller: Optional[bool] = False,
1320-
omap_file_lock_duration: Optional[int] = 60,
1321-
omap_file_lock_retries: Optional[int] = 15,
1322-
omap_file_lock_retry_sleep_interval: Optional[int] = 5,
1320+
omap_file_lock_duration: Optional[int] = 20,
1321+
omap_file_lock_retries: Optional[int] = 30,
1322+
omap_file_lock_retry_sleep_interval: Optional[float] = 1.0,
13231323
omap_file_update_reloads: Optional[int] = 10,
13241324
enable_prometheus_exporter: Optional[bool] = True,
13251325
bdevs_per_cluster: Optional[int] = 32,
@@ -1500,6 +1500,42 @@ def validate(self) -> None:
15001500
if self.allowed_consecutive_spdk_ping_failures < 1:
15011501
raise SpecValidationError("Allowed consecutive SPDK ping failures should be at least 1")
15021502

1503+
if self.state_update_interval_sec < 0:
1504+
raise SpecValidationError("State update interval can't be negative")
1505+
1506+
if self.omap_file_lock_duration < 0:
1507+
raise SpecValidationError("OMAP file lock duration can't be negative")
1508+
1509+
if self.omap_file_lock_retries < 0:
1510+
raise SpecValidationError("OMAP file lock retries can't be negative")
1511+
1512+
if self.omap_file_update_reloads < 0:
1513+
raise SpecValidationError("OMAP file reloads can't be negative")
1514+
1515+
if self.spdk_timeout < 0.0:
1516+
raise SpecValidationError("SPDK timeout can't be negative")
1517+
1518+
if self.conn_retries < 0:
1519+
raise SpecValidationError("Connection retries can't be negative")
1520+
1521+
if self.max_log_file_size_in_mb < 0:
1522+
raise SpecValidationError("Log file size can't be negative")
1523+
1524+
if self.max_log_files_count < 0:
1525+
raise SpecValidationError("Log files count can't be negative")
1526+
1527+
if self.max_log_directory_backups < 0:
1528+
raise SpecValidationError("Log file directory backups can't be negative")
1529+
1530+
if self.monitor_timeout < 0.0:
1531+
raise SpecValidationError("Monitor timeout can't be negative")
1532+
1533+
if self.port and self.port < 0:
1534+
raise SpecValidationError("Port can't be negative")
1535+
1536+
if self.discovery_port and self.discovery_port < 0:
1537+
raise SpecValidationError("Discovery port can't be negative")
1538+
15031539

15041540
yaml.add_representer(NvmeofServiceSpec, ServiceSpec.yaml_representer)
15051541

0 commit comments

Comments
 (0)