Skip to content

Commit d958845

Browse files
kawmarcofacebook-github-bot
authored andcommitted
Don't start PetWatchdogLoop on BMC Lite platforms
Summary: Just noticed we don't try petting the watchdog on BMC Lite platforms, replicate behaviour on `PetWatchdogLoop` and avoid problems similar to S368275 Test Plan: Successfully upgrade fbdarwin device, ensure relevant log message appears: ``` 2025 Mar 21 12:53:47 rsw013-oob.p060.f01.ncg2.tfbnw.net kern.info fbdarwin-2024.50.0: [flashy|/run/flashy/flash_procedure/flash_fbdarwin --imagepath /run/upgrade/image --device mtd:flash0][3068]: 2025/03/21 12:53:47 Not starting PetWatchdogLoop; BMC Lite ``` Reviewed By: cjcon90 Differential Revision: D71643054 fbshipit-source-id: 814de38830348871122314859b25d65632b484b8
1 parent 3c60c38 commit d958845

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/flashy/lib/utils/system.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ func tryPetWatchdog(wait bool) bool {
590590
// - When /dev/watchdog it NOT busy and there are no concurrent instances of
591591
// wdtcli, the watchdog timeout will be extended and the watchdog petted.
592592
var PetWatchdog = func() {
593+
// S368275: Don't open /dev/watchdog on BMC Lite platforms
593594
if IsBMCLite() {
594595
log.Printf("Watchdog not petted; BMC Lite")
595596
return
@@ -606,6 +607,12 @@ var PetWatchdog = func() {
606607
}
607608

608609
var PetWatchdogLoop = func() {
610+
// S368275: Don't open /dev/watchdog on BMC Lite platforms
611+
if IsBMCLite() {
612+
log.Printf("Not starting PetWatchdogLoop; BMC Lite")
613+
return
614+
}
615+
609616
log.Printf("PetWatchdogLoop started")
610617
for {
611618
if tryPetWatchdog(true) {

0 commit comments

Comments
 (0)