Repository navigation
rest-api: Fix the AST2700 reset reason and two robustness bugs - #317
Open
louis-nexthop wants to merge 1 commit into
Open
louis-nexthop wants to merge 1 commit into
louis-nexthop wants to merge 1 commit into
Conversation
|
This pull request has been imported. If you are a Meta employee, you can view this in D131938858. (Because this pull request was imported automatically, there will not be any future comments.) |
- node_bmc.py: Reset Reason reads the AST2700 WDT0 timeout counter (0x14C37010) instead of the WDTA one (0x14C37410). A reboot resets through WDT0; WDTA is the boot watchdog and only counts its own timeouts, so Reset Reason reported "Power ON Reset" after every reboot. - rest_fruid.py, rest_fruid_pim.py, fboss-lite rest_fruid.py, rest_sensors.py: Popen has no TimeoutError, so a command that timed out raised AttributeError. Catch subprocess.TimeoutExpired, kill the command and use its output. - rest_gpios.py: a FRU without a Product Name no longer raises KeyError. Signed-off-by: Louis Maliyam <louis@nexthop.ai>
louis-nexthop
force-pushed
the
rest-api-ast2700-fixes
branch
from
November 14, 2026 02:55
b7407c1 to
66ea545
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
node_bmc.py: Reset Reason reads the AST2700 WDT0 timeout counter (0x14C37010) instead of the WDTA one (0x14C37410). A reboot resets through WDT0; WDTA is the boot watchdog and only counts its own timeouts, so Reset Reason reported "Power ON Reset" after every reboot.rest_fruid.py,rest_fruid_pim.py, fboss-literest_fruid.py,rest_sensors.py:Popenhas noTimeoutError, so a command that timed out raisedAttributeError. They now catchsubprocess.TimeoutExpired, kill the command and read its output.rest_gpios.py: a FRU without a Product Name no longer raisesKeyError.Motivation
Found bringing up an AST2700 fboss-lite machine; none of it is board-specific.
Test Plan
On the AST2720 variant of Nexthop's BMC with this change. A warm reboot resets through WDT0, which counts it, and Reset Reason reports it:
The other endpoints: