Redfish power driver has issues with some BMC's

Bug #1845032 reported by Freddy on 2019-09-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Freddy

Bug Description

We have switched to the redfish power driver for MaaS and encountered a few bugs that we needed to fix.

- removed trailing slashes from redfish power driver. This caused errors for some manufacturers implementations that we use
- catch json parsing errors and return a sensible error message if it fails to parse
- increase timeout on power query calls
- check state in redfish power driver power_off prior to submitting power_off request. Some redfish implementations we encountered errors if the state was already off and a power off request was submitted

Will comment with branch once bug is created

Related branches

Blake Rouse (blake-rouse) wrote :

Question on this one:

"removed trailing slashes from redfish power driver. This caused errors for some manufacturers implementations that we use", but does it cause communication with other BMC's from different manufactures fail? What is the Redfish specification, say?

"catch json parsing errors and return a sensible error message if it fails to parse", who's parsing errors? MAAS parsing the JSON result or the BMC failing to parse the JSON body of the request?

Freddy (fwieffering) wrote :

> "removed trailing slashes from redfish power driver. This caused errors for some manufacturers implementations that we use", but does it cause communication with other BMC's from different manufactures fail? What is the Redfish specification, say?

We are using MaaS with three hardware vendors - dell, cisco, and hpe. The trailing slash has occasionally caused issues with cisco BMCs. Removing the trailing slash has not caused problems for the three manufacturers we use. I do not see specification in the redfish DMTF on whether a trailing slash should be included http://redfish.dmtf.org/schemas/DSP0266_1.0.html

>"catch json parsing errors and return a sensible error message if it fails to parse", who's parsing errors? MAAS parsing the JSON result or the BMC failing to parse the JSON body of the request?

In the redfish.py cb_json_decode method json.loads() of the response body is called. The change is to catch ValueErrors resulting from invalid json returned by a BMC, and raise a PowerActionError. We have occasionally encountered invalid json returned by redfish requests to the BMC and this just adds error handling for it.

Alberto Donato (ack) wrote :

Hi Freddy, would you mind creating a merge proposal for your branch so we can do a proper review?

Changed in maas:
status: New → Triaged
summary: - redfish bug fixes
+ Redfish power driver has issues with some BMC's
Changed in maas:
importance: Undecided → High
status: Triaged → In Progress
assignee: nobody → Freddy (fwieffering)
milestone: none → 2.7.0alpha1
Changed in maas:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers