Add BMCWatchdog base class to be used in SONiC BMC - #702
Conversation
BMCWatchdog implements the Linux watchdog API as an IPC client to the hw-watchdog-mgrd daemon (the sole owner of /dev/watchdog0), with a read-only sysfs fallback for is_armed() when the daemon is unreachable. socket and sysfs paths are configurable via the constructor. Includes unit tests. Signed-off-by: Chandrasekaran Swaminathan <chander@nexthop.ai>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
|
|
||
| # Default IPC socket served by the hw-watchdog-mgrd daemon. This must match | ||
| # SOCKET_PATH in the platform's hw-watchdog-mgrd.py daemon. | ||
| SOCKET_PATH = "/run/hw-watchdog-mgrd.sock" |
There was a problem hiding this comment.
@chander-nexthop not sure if you already working on this .. but we need a way to mount this path in pmon docker to be able to using platform_api infra to arm/unarm or other operations on watchdog
There was a problem hiding this comment.
I wasn't. In fact had asked you about this here at sonic-net/sonic-buildimage#28715 (comment)
I shall take this up, but don't think this PR needs to be gated for that.
There was a problem hiding this comment.
There was a problem hiding this comment.
Will fix the path in this PR after that PR merges.
|
This PR has backport request label(s) for branch(es): msft-202608, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202608: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
in SONiC BMC, the watchdog service would be modeled along the classic linux watchdog daemon model, where one daemon would be the owner of /dev/watchdog0. However watchdog util expects the watchdog class to implement the SONiC watchdog API's like arm/disarm etc. So create a BMCWatchdog that implements all these API's as IPC calls to the daemon.
Description
BMCWatchdog implements the Linux watchdog API as an IPC client to the hw-watchdog-mgrd daemon (the sole owner of /dev/watchdog0), with a read-only sysfs fallback for is_armed() when the daemon is unreachable. socket and sysfs paths are configurable via the constructor. Includes unit tests.
Motivation and Context
By having the BMCWatchdog, all vendors that have their BMC based on aspeed 2720 SoC will instantiate this class within their Chassis object. The watchdog daemon is already part of the aspeed SONiC image.
How Has This Been Tested?
Unit tests have been added.
Additional Information (Optional)
Refer to sonic-net/sonic-buildimage#27776 for the discussions.