Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot Fix: ODF disk count issue #914

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

ebattat
Copy link
Collaborator

@ebattat ebattat commented Oct 7, 2024

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies

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

@ebattat ebattat added the bug Something isn't working label Oct 7, 2024
@ebattat ebattat self-assigned this Oct 7, 2024
@ebattat ebattat changed the title Fix ODF disk count Hot Fix: ODF disk count issue Oct 7, 2024
# Log the error and return -1 as a fallback
logger.error(f"Error converting ODF disk count to integer: {e}")
return -1
except Exception as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this usually won't be run interactively, but it isn't a bad idea to catch KeyboardInterrupt and BrokenPipe and exit.

Copy link
Collaborator Author

@ebattat ebattat Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of error I dont want to exit jenkin pipeline, I return '-1'

@ebattat ebattat merged commit 6d3ee45 into redhat-performance:main Oct 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants