benchmark-runner 1.0.692__py3-none-any.whl → 1.0.694__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -379,22 +379,28 @@ class OC(SSH):
379
379
  def wait_for_odf_healthcheck(self, pod_name: str, namespace: str,
380
380
  timeout: int = int(environment_variables.environment_variables_dict['timeout'])):
381
381
  """
382
- This method waits for patch, needs to wait that pod is created and then wait for ready
383
- @param pod_name:
384
- @param namespace:
385
- @param timeout:
386
- @return:
382
+ This method waits for the ODF health check by ensuring the pod is created and reaches the 'HEALTH_OK' status.
383
+
384
+ @param pod_name: Name of the pod to check health.
385
+ @param namespace: Namespace where the pod is located.
386
+ @param timeout: Timeout in seconds for waiting. If set to 0 or negative, wait indefinitely.
387
+ @return: True if health check passes within the timeout.
388
+ @raise ODFHealthCheckTimeout: If health check fails within the timeout.
387
389
  """
388
390
  current_wait_time = 0
389
391
  health_check = f"{self.__cli} -n {namespace} rsh {self._get_pod_name(pod_name=pod_name, namespace=namespace)} ceph health"
390
- while timeout <= 0 or current_wait_time <= timeout and 'HEALTH_OK' != self.run(health_check).strip():
391
- # sleep for x seconds
392
+
393
+ while timeout <= 0 or current_wait_time <= timeout:
394
+ if 'HEALTH_OK' == self.run(health_check).strip():
395
+ return True
396
+
397
+ # Sleep for a defined interval and update the wait time
392
398
  time.sleep(OC.SLEEP_TIME)
393
399
  current_wait_time += OC.SLEEP_TIME
394
- if 'HEALTH_OK' == self.run(health_check).strip():
395
- return True
396
- else:
397
- raise ODFHealthCheckTimeout()
400
+
401
+ # Raise exception if health check fails within the timeout
402
+ raise ODFHealthCheckTimeout(
403
+ message=f"Health check failed for pod '{pod_name}' in namespace '{namespace}' after {timeout} seconds.")
398
404
 
399
405
  @typechecked
400
406
  @logger_time_stamp
@@ -471,7 +477,7 @@ class OC(SSH):
471
477
  wait_time = wait_time or OC.SHORT_TIMEOUT
472
478
  nodes_status = None
473
479
  current_wait_time = 0
474
- while timeout <= 0 or current_wait_time < timeout:
480
+ while timeout <= 0 or current_wait_time <= timeout:
475
481
  nodes_status = self.check_node_status(node=node)
476
482
  if nodes_status is True:
477
483
  return True
@@ -161,8 +161,8 @@ class OperatorUpgradeTimeout(OCError):
161
161
 
162
162
  class ODFHealthCheckTimeout(OCError):
163
163
  """This exception return odf healthcheck timeout error"""
164
- def __init__(self):
165
- self.message = f"ODF health check timeout"
164
+ def __init__(self, message: str):
165
+ self.message = message
166
166
  super(ODFHealthCheckTimeout, self).__init__(self.message)
167
167
 
168
168
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: benchmark-runner
3
- Version: 1.0.692
3
+ Version: 1.0.694
4
4
  Summary: Benchmark Runner Tool
5
5
  Home-page: https://github.com/redhat-performance/benchmark-runner
6
6
  Author: Red Hat
@@ -46,8 +46,8 @@ benchmark_runner/common/logger/init_logger.py,sha256=ERa-gNqrl2pZybj7v3csvmao7Mv
46
46
  benchmark_runner/common/logger/logger_exceptions.py,sha256=rivdlRm_jIsKQ53rP_-HX8emdtOmQNO4JuIkg8fnBoc,454
47
47
  benchmark_runner/common/logger/logger_time_stamp.py,sha256=2JgugN9LpXF4Ijx0wPRzz3DAGJB8eJpM5g1qPvbWbV8,1479
48
48
  benchmark_runner/common/oc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
- benchmark_runner/common/oc/oc.py,sha256=Z_XGh_PJzKfN7kfSwhoCJs7ZofynPaziN20nNKLHUBM,66236
50
- benchmark_runner/common/oc/oc_exceptions.py,sha256=Hj0IIjIbLkKnfhErynpAIzupdsU-eerndwQBPoNWShs,6342
49
+ benchmark_runner/common/oc/oc.py,sha256=VfD-IQRjRT5-nhkCi1zH9rhY6giOywQJw2oIkgf6GZM,66694
50
+ benchmark_runner/common/oc/oc_exceptions.py,sha256=4JDebyFqe6yIN6Y70E-oscWnme0t7Ggg_CJBBoOuFPs,6336
51
51
  benchmark_runner/common/ocp_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  benchmark_runner/common/ocp_resources/create_cnv.py,sha256=AXsyR8_g_RIFHz2rkyHzzvvUDIiGdOi9rZWJPhiPzDQ,3511
53
53
  benchmark_runner/common/ocp_resources/create_custom.py,sha256=rthm96yDzI-Hke54hLWTs0O3gDtpQPR6n184ehaEevo,1029
@@ -165,8 +165,8 @@ benchmark_runner/workloads/windows_vm.py,sha256=eHK79ueAkSlNC1uamz19o7CO20wzJi-U
165
165
  benchmark_runner/workloads/workloads.py,sha256=F9fnk4h715tq7ANSCbDH0jktB8fpr_u3YG61Kdi5_os,1422
166
166
  benchmark_runner/workloads/workloads_exceptions.py,sha256=u7VII95iPRF_YhfpGH1U1RmgiIYESMOtbSF1dz7_ToE,1858
167
167
  benchmark_runner/workloads/workloads_operations.py,sha256=tAgvdMRMu5Ybck81UBCBE6H76PN0L2GptjNRnYoFv2M,25221
168
- benchmark_runner-1.0.692.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
169
- benchmark_runner-1.0.692.dist-info/METADATA,sha256=xcv8EA8DFXjo6sjIbMeaXZHnNxiLJ7D2Lzph4C0YER0,11309
170
- benchmark_runner-1.0.692.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
171
- benchmark_runner-1.0.692.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
172
- benchmark_runner-1.0.692.dist-info/RECORD,,
168
+ benchmark_runner-1.0.694.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
169
+ benchmark_runner-1.0.694.dist-info/METADATA,sha256=Hg6NRK_PqsEfb6L_FL2bBU00Dsr7NK-kl60j83ahpkc,11309
170
+ benchmark_runner-1.0.694.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
171
+ benchmark_runner-1.0.694.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
172
+ benchmark_runner-1.0.694.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.4.0)
2
+ Generator: setuptools (75.5.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5