mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-05 04:27:56 +00:00
7b9ad03aaf
A bmc that does not implement a lan configuration parameter says so in the completion code and answers with no data at all. The helper reached straight into the payload, so such a parameter raised IndexError, and with it went the whole of nodeconfig over ipmi: the bmc group, the plain, the detailed, the extended and the advanced reads all ended in "bytearray index out of range". It also took the attribute enumeration with it, so the client then rejected names it should have accepted. The guard that was there caught an exception carrying the completion code, but oldraw_command reports the code in its response rather than raising on it, so nothing was ever caught. Read the code from the response instead: parameter not supported and parameter out of range mean the platform does not have it, and anything else is a real failure that should say what it was rather than be mistaken for absence. The address configuration method was looked up in a table with no regard for whether it had been read at all, so a bmc that does not report it would have traded the IndexError for a KeyError. Answer None when it is absent, as the address above it already does, and name the value when it is present but unfamiliar.