Redfish power control on Dell iDrac9 fails due to charset on the POST content-type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Looking at the MAAS source, the Redfish power control sets a Content-type of "application/json; charset=utf-8" when using the POST method. This does not work when trying to POST against the Redfish endpoint of the iDrac 9, with a HTTP 415 result.
Testing using a simple python snippet, adding any "; charset=..." value to the Content-type value, results in the iDrac rejecting it with 415. Remove the charset, and it works fine.
The DMTF documentation for Redfish doesn't seem to say anything about character sets, but even the de facto default of ISO-8859-1 fails, so I do believe the fault really is in the HTTP endpoint on the iDrac. However, it's easy to fix in MAAS, and I have raised an issue with Dell.
I have tested this with both MAAS 2.8 and the 2.9beta. The log line in maas.log reads:
2020-11-
summary: |
- Redfish power control on Dell iDrac9 fails due to charset + Redfish power control on Dell iDrac9 fails due to charset on the POST + content-type |
I notice 2.9 still has this particular behaviour, and the fix appears to be removing the "; charset=utf-8" on line 59 of src/provisionin gserver/ drivers/ power/redfish. py.
I have still to sort this out with Dell on their side.