redhat-performance / benchmark-runner

Containerized Python based Framework for running and visualizing benchmark workloads on any Kubernetes/ OpenShift and runtime kinds pods, kata containers and kubevirt virtual machines simply and safely
Apache License 2.0
20 stars 19 forks source link

Hot Fix: ODF disk count issue #914

Closed ebattat closed 1 month ago

ebattat commented 1 month ago

Type of change

Note: Fill x in []

Description

Fix the following error by return -1 in case of error:


             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/benchmark_runner/workloads/bootstorm_vm.py", line 193, in _verify_single_vm

    self._finalize_vm()

  File "/usr/local/lib/python3.12/site-packages/benchmark_runner/workloads/bootstorm_vm.py", line 126, in _finalize_vm

    self._upload_to_elasticsearch(index=self._es_index, kind=self._kind, status=self._status,

  File "/usr/local/lib/python3.12/site-packages/benchmark_runner/workloads/workloads_operations.py", line 431, in _upload_to_elasticsearch

    self._es_operations.upload_to_elasticsearch(index=index, data=self.__get_metadata(kind=kind, status=status, result=result))

                                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/benchmark_runner/workloads/workloads_operations.py", line 405, in __get_metadata

    'odf_disk_count': -1 if self._oc.get_odf_disk_count() in {0, 1} else self._oc.get_odf_disk_count()

                                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/local/lib/python3.12/site-packages/benchmark_runner/common/oc/oc.py", line 418, in get_odf_disk_count

    return int(self.run(f"{self.__cli} get --no-headers pod -n openshift-storage | grep osd | grep -cv prepare"))

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ValueError: invalid literal for int() with base 10: 'E1007 20:20:15.650261  332589 memcache.go:265] couldn\'t get current server API group list: Get "https://api.bm.perfci.com:6443/api?timeout=32s": dial tcp 198.18.10.3:6443: connect: connection refuse

script returned exit code 1

For security reasons, all pull requests need to be approved first before running any automated CI