fix(redfish): tolerate null collection Members on BlueField BMC#166
fix(redfish): tolerate null collection Members on BlueField BMC#166shevchenko-evgeny wants to merge 2 commits into
Conversation
This is a per-collection opt-in: collections not routed through CollectionWithPatch (e.g. processors, memory) are unaffected until explicitly migrated. Signed-off-by: Evgeny Shevchenko <eshevchenko@mirantis.com>
| v | ||
| } | ||
|
|
||
| /// Storage collection. |
There was a problem hiding this comment.
This change looks not relevant to the PR description.
There was a problem hiding this comment.
While fixing this I realized the Members: null problem isn't specific to BootOptions - every empty collection on the BlueField BMC serializes Members as null instead of []. So far I've found at least these:
/redfish/v1/Cables
/redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates
/redfish/v1/Systems/Bluefield/Oem/Nvidia/Truststore/Certificates
/redfish/v1/Systems/Bluefield/Storage
/redfish/v1/Systems/Bluefield/BootOptions
First three (Cables, both Certificates) - not an big issue today: their collection types aren't compiled into the tree, so they're only ever held as references and never deserialized. The null is harmless until something actually fetches them.
Latest two I fixed explicitly.
There was a problem hiding this comment.
I've never seen something like this from BF3 DPU. Maybe you are using some old BMC FW version?
There was a problem hiding this comment.
It’s definitely not the latest version, but until NICO upgrades the BMC firmware, it should be sufficient to pass the pre-injection phase.
For context, this is part of the PowerEdge XE9780 onboarding umbrella issue.
There was a problem hiding this comment.
Ok. Fair enough. Could you please move storage collection to storage.rs module then. Everything else LGTM.
Signed-off-by: Evgeny Shevchenko <eshevchenko@mirantis.com>
2be43d4 to
b0e9142
Compare
This is a per-collection opt-in: collections not routed through CollectionWithPatch (e.g. processors, memory) are unaffected until explicitly migrated.
This is another option for addressing the problem discussed more generally in PR #120.
I’m still not sure whether it is better than the solution proposed there. That approach only covers collections explicitly gated through
CollectionWithPatch, while it appears that any empty collection may exhibit the same issue on that BMC. As a result, we could still see unexpected behavior in certain states.At the same time, routing every possible collection through
CollectionWithPatchdoes not seem practical and would be quite verbose.