Skip to content

flashy-87c3594

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Jul 10:22
Fix missing MTD error handling - add specific error

Summary:
Currently, upgrades that fail because of a blank /proc/mtd are being classed as `UNSAFE_TO_REBOOT` errors. This is because to classify as a `BAD_FLASH_CHIP` error, Flashy is grepping for the particular string *'Cannot access MTD device'* whereas the error on the BMC is returning:
```
root@rsw006-oob:~# cat /proc/mtd
dev:    size   erasesize  name
root@rsw006-oob:~# fw_printenv bootargs
Cannot open /dev/mtd1: No such file or directory
```
Let's fix this by skipping the string grepping logic completely, as we already know that we cannot see MTD at this stage

Also added as separate error class, as missing MTD is a specific issue that we see quite frequently and good to classify it separately

Test Plan:
Unit tests
```
$ ./tools/flashy/scripts/run_unit_tests.sh
...
...
...
142/142 unit tests passed
```
 ---
Will handle exceptions in oobgrader and test in following diff

Reviewed By: doranand

Differential Revision: D60115096

fbshipit-source-id: 77e0cb6aa18fdb71e4c711d3951c7282aab23b6a