@@ -170,17 +170,6 @@ class LoggingOptions(ABC):
170170 log : Optional [LoggingOptions ] = None
171171
172172
173- @typed_dataclass
174- @dataclass
175- class YafZCBalanceSettings (ABC ):
176- in_ : Optional [str ] = None
177- cluster : int = 99
178- num : int = 1
179- core : Optional [int ] = None
180- time_ : Optional [int ] = None
181- stats : Optional [int ] = None
182-
183-
184173class Yaf (ProbeInterface ):
185174 host_statistics = None
186175
@@ -479,11 +468,6 @@ def __init__(
479468 target : ProbeException ,
480469 protocols : List [str ],
481470 interfaces : List [InterfaceCfg ],
482- cluster : int = 99 ,
483- num : int = 1 ,
484- core = None ,
485- time_ = None ,
486- stats = None ,
487471 rss_queues : int = 1 ,
488472 ** kwargs ,
489473 ):
@@ -540,33 +524,8 @@ def start(self):
540524
541525 self .host_statistics .start ()
542526
543- max_restarts = 10
544- restarts = 0
545-
546527 for instance in self ._yaf_instances :
547- while not (
548- hasattr (instance , "_process" ) and instance ._process .is_running ()
549- ):
550- try :
551- instance .start (False , False )
552- except ExecutableProcessError as e :
553- with open (instance ._log_file , "r" ) as f :
554- content = "\n " .join (f .readlines ())
555- if restarts == max_restarts :
556- logging .error ("Reached max restart counter" )
557- logging .error (content )
558- raise e
559- elif (
560- f"Please check that cluster { self ._yafzbalance_settings .cluster } is running"
561- in content
562- ):
563- # try start again but wait before next start
564- logging .info ("Trying to start yaf again" )
565- restarts += 1
566- time .sleep (3 )
567- else :
568- logging .error (content )
569- raise e
528+ instance .start (False , False )
570529
571530 def stop (self ):
572531 """Stop the probe."""
@@ -595,8 +554,6 @@ def cleanup(self):
595554 instance .cleanup ()
596555
597556 def download_logs (self , directory : str ):
598- open (self ._config_file , "+w" ).close ()
599- super ().download_logs (directory )
600557 for instance in self ._yaf_instances :
601558 instance .download_logs (directory )
602559
0 commit comments