You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure BMC image is compatible with MB CPLD version
Summary: grandteton versions v2024.11.1 require MB CPLD version `20010` or greater. Added `checks_and_remediations` step to fail the upgrade if the MB CPLD version is incompatible with the image version.
Test Plan:
Unit tests, push flashy/bmc images to grandteton units e.g:
```
$ scripts/run_flashy_remote.sh --device mtd:flash1 --imagepath /tmp/tmp.H8gzWMVfip/openbmc.image.grandteton\:v2024.11.1/flash-grandteton --host twshared39604-oob.02.nao6.facebook.com --dry-run
```
Run step on a BMC with image version = v2024.11.1 and old MB CPLD (should fail):
```
# /run/flashy/flashy --install && /run/flashy/checks_and_remediations/grandteton/00_ensure_compatible_mb_cpld_version --imagepath /run/upgrade/image --device mtd:flash1
...
{"message":"S365492: Image version ('grandteton-v2024.11.1') requires MB CPLD version 20010 or greater (current MB CPLD version is 20006)"}
```
Run step on a BMC with image version = v2024.11.1 and new MB CPLD (should succeed):
```
/run/flashy/flashy --install && /run/flashy/checks_and_remediations/grandteton/00_ensure_compatible_mb_cpld_version --imagepath /run/upgrade/image --device mtd:flash1
...
2024/04/09 08:33:48 MB CPLD version 20010 is compatible with image version grandteton-v2024.11.1
```
Run step on a BMC with image version < v2024.11.1 and old MB CPLD (should succeed):
```
# /run/flashy/flashy --install && /run/flashy/checks_and_remediations/grandteton/00_ensure_compatible_mb_cpld_version --imagepath /run/upgrade/image --device mtd:flash1
...
2024/04/09 08:35:46 MB CPLD version 20006 is compatible with image version grandteton-v2023.39.2
```
Run step on a BMC with image version < v2024.11.1 and new MB CPLD (should succeed):
```
# /run/flashy/flashy --install && /run/flashy/checks_and_remediations/grandteton/00_ensure_compatible_mb_cpld_version --imagepath /run/upgrade/image --device mtd:flash1
...
2024/04/09 08:40:29 MB CPLD version 20010 is compatible with image version grandteton-v2023.39.2
```
Reviewed By: doranand
Differential Revision: D55921434
fbshipit-source-id: 8672d76c8f4ef18978cda8826f73395b1309b50c