@@ -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
15041540yaml .add_representer (NvmeofServiceSpec , ServiceSpec .yaml_representer )
15051541
0 commit comments