Skip to content

Add BMCWatchdog base class to be used in SONiC BMC#702

Open
chander-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:chander.bmc-watchdog
Open

Add BMCWatchdog base class to be used in SONiC BMC#702
chander-nexthop wants to merge 1 commit into
sonic-net:masterfrom
nexthop-ai:chander.bmc-watchdog

Conversation

@chander-nexthop

Copy link
Copy Markdown

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.

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>
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants