mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-05 04:27:56 +00:00
58d56426ed
There is no ipmi command for a bmc hostname, so get_hostname falls back to the DCMI management controller identifier. A bmc that does not implement the DCMI group at all rejects that with "invalid command", which was handed to the caller as if the request had been bad: nodeconfig <node> bmc read seven fields correctly and then reported "Error: Invalid command", and the api answered 500 Unexpected error. Route every DCMI request through one helper that turns "invalid command" and "command disabled or unavailable" into UnsupportedFunctionality, so the identifier, the asset tag and the hostname all report a platform that cannot do this rather than a fault. Where the caller asked about a hostname, say that rather than naming DCMI. The whole group read still ends in one error line, because an operation a platform cannot perform and one that failed are the same message to the client. That is worth separating, but not here.