Skip to content

flashy-ceaf69c

Choose a tag to compare

@github-actions github-actions released this 28 May 22:42
log persist motd reset outcome

Summary:
flashCpAndValidate unconditionally removes /run/mnt-persist/etc-data/motd
after flashing to drop the LF OpenBMC overlayfs persist file, but the
return value from RemoveFile was discarded. When the removal fails for
any reason (read-only fs, EIO, persist mount missing post-flash) there
is no trace of it in the flashy log, which makes stale post-upgrade
motd banners untraceable from oobgrader output alone.

Add a small switch around the removal:
- success logs that the persist motd was reset
- ENOENT stays silent (expected on non-LF or unmodified motd)
- any other error is logged with the path and underlying error

No behavior change beyond logging; the function still returns the
flashcp error unchanged so the existing TestFlashCpAndValidate
"succeeded, with remove failure" case continues to pass.

Test Plan:
cd tools/flashy && go test ./...
All packages PASS, including lib/flash.

Reviewed By: Prabha-Veerubhotla

Differential Revision: D106693971

fbshipit-source-id: 4dd26fd2942c58569ef519cc575c30f35aedc51a