You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"show system-health summary" crashes due to missing module health_checker. #6104
Description system_health script crashes due to missing module health_checker.
Root cause - The system_health library (in sonic-utilities) is Python3 based whereas health_checker (in sonic-buildimage) is still Python2 based:
File "/usr/local/lib/python3.7/dist-packages/show/system_health.py", line 33, in summary
from health_checker.manager import HealthCheckerManager
ModuleNotFoundError: No module named 'health_checker'
root@str-s6100-acs-4:~# show system-health summary
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/show/system_health.py", line 21, in summary
if os.environ["UTILITIES_UNIT_TESTING"] == "1":
File "/usr/lib/python3.7/os.py", line 678, in __getitem__
raise KeyError(key) from None
KeyError: 'UTILITIES_UNIT_TESTING'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/show", line 10, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/show/system_health.py", line 33, in summary
from health_checker.manager import HealthCheckerManager
ModuleNotFoundError: No module named 'health_checker'
root@str-s6100-acs-4:~#
I already have a PR to do so, but I am waiting for Mellanox to provide a Python 3 sonic-platform package before merging it: #5886. @Junchao-Mellanox and @keboliu are working on the Python 3 sonic-platform package, ETA of later this month.
Activity
vaibhavhd commentedon Dec 3, 2020
@jleveque, is there an existing plan/effort to port
system-healthmodule to Python3?https://github.com/Azure/sonic-buildimage/tree/master/src/system-health
jleveque commentedon Dec 3, 2020
I already have a PR to do so, but I am waiting for Mellanox to provide a Python 3 sonic-platform package before merging it: #5886. @Junchao-Mellanox and @keboliu are working on the Python 3 sonic-platform package, ETA of later this month.