Skip to content

Commit

Permalink
[WARM-REBOOT] fix issue of watchdog on simx when executing warm-reboo…
Browse files Browse the repository at this point in the history
…t command (sonic-net#8132)

- Why I did it
to prevent python exception error when executing warm-reboot command on mellanox simulator platform

- How I did it
return None on the watchdog python script on cases that watchdog file is not exist

- How to verify it
warm-reboot is running well without the python error. error message will appear on log on these cases.
in order to avoid this error message we can simulate the watchdog on mellanox simulator platform
  • Loading branch information
tomer-israel authored and qiluo-msft committed Jul 20, 2021
1 parent 4b52848 commit 13a6266
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ def get_watchdog():
if device.startswith("watchdog") and is_mlnx_wd_main(device):
watchdog_main_device_name = device

if watchdog_main_device_name is None:
return None

watchdog_device_path = "/dev/{}".format(watchdog_main_device_name)

watchdog = None
Expand Down

0 comments on commit 13a6266

Please sign in to comment.