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

[Platform] Health-check script generates an alert for 2.5.x when using Python 3 #7082

Closed
SergeyPotachev opened this issue Feb 3, 2021 · 1 comment
Assignees
Labels
area/platform Yugabyte Platform
Milestone

Comments

@SergeyPotachev
Copy link
Contributor

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "bin/cluster_health.py", line 446, in multithreaded_caller
return getattr(instance, func_name)(*args, **kwargs)
File "bin/cluster_health.py", line 315, in check_uptime_for_process
uptime = self.get_uptime_for_process(process)
File "bin/cluster_health.py", line 310, in get_uptime_for_process
return self._remote_check_output(remote_cmd).strip()
File "bin/cluster_health.py", line 233, in _remote_check_output
if output.endswith('No route to host'):
TypeError: endswith first arg must be bytes or a tuple of bytes, not str
"""

The script requires small update.

@SergeyPotachev SergeyPotachev added the area/platform Yugabyte Platform label Feb 3, 2021
@SergeyPotachev SergeyPotachev added this to the 2.5.x milestone Feb 3, 2021
@SergeyPotachev SergeyPotachev self-assigned this Feb 3, 2021
@SergeyPotachev
Copy link
Contributor Author

One more stack trace for Python 3:

Traceback (most recent call last):
File "bin/cluster_health.py", line 605, in
main()
File "bin/cluster_health.py", line 589, in main
entries = coordinator.run()
File "bin/cluster_health.py", line 488, in run
" for check " + check.func_name)

SergeyPotachev added a commit that referenced this issue Feb 5, 2021
…g Python 3 #7082

Summary:
 - Fixed error in 'cluster_health.py' for execution with Python 3.x;
 - Added logic to mark all active health-check alerts as RESOLVED once a health-check succeeded;
 - Updated text of emails for alerts - previously state was absent there;
 - Updated junit tests.

Test Plan:
Test scenario 1.
  Check that health-check works without problems when Python 3 is used.

Test scenario 2.
  1. Initiate the health-check problem by any reason. You should receive an email with the alert. The alert should appear on the 'Alerts' page of YW UI.
  2. Resolve the problem from step 1. Ensure that another email is received where the alert state is mentioned as 'RESOLVED'. The alert should disappear from the 'Alerts' page of YW UI.

Reviewers: daniel

Reviewed By: daniel

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10543
polarweasel pushed a commit to lizayugabyte/yugabyte-db that referenced this issue Mar 9, 2021
…g Python 3 yugabyte#7082

Summary:
 - Fixed error in 'cluster_health.py' for execution with Python 3.x;
 - Added logic to mark all active health-check alerts as RESOLVED once a health-check succeeded;
 - Updated text of emails for alerts - previously state was absent there;
 - Updated junit tests.

Test Plan:
Test scenario 1.
  Check that health-check works without problems when Python 3 is used.

Test scenario 2.
  1. Initiate the health-check problem by any reason. You should receive an email with the alert. The alert should appear on the 'Alerts' page of YW UI.
  2. Resolve the problem from step 1. Ensure that another email is received where the alert state is mentioned as 'RESOLVED'. The alert should disappear from the 'Alerts' page of YW UI.

Reviewers: daniel

Reviewed By: daniel

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D10543
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/platform Yugabyte Platform
Projects
None yet
Development

No branches or pull requests

2 participants