Bug 1802726 - sushy ignores redfish 'None' field value and causes boot mode changes to fail in ironic
Summary: sushy ignores redfish 'None' field value and causes boot mode changes to fail...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.4
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
: 4.4.0
Assignee: Riccardo Pittau
QA Contact: Raviv Bar-Tal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 18:53 UTC by Julia Kreger
Modified: 2020-05-04 11:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:36:24 UTC
Target Upstream Version:
Embargoed:
rpittau: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:36:39 UTC

Description Julia Kreger 2020-02-13 18:53:45 UTC
This bug was initially created as a copy of Bug #1802721

I am copying this bug because: 



Description of problem:

Issue is that the Sushy library has strict controls around values of fields and interpreted any field with a string value of 'None' to be invalid, however in the redfish specification, the string 'None' is actually a valid value.

This strict validation code was introduced during the OpenStack Train development cycle.


How reproducible:

Every time when boot mode must be changed with ironic.

Steps to Reproduce:
1. Using ironic, with a redfish supporting machine (idrac8, 2.70.70.70 or idrac9, or HPE ilo), when starting from "Legacy" boot mode.
2. Attempt to deploy a machine using the 'redfish' driver, with the boot mode set to 'uefi'

Actual results:

Error is returned to the user.

"last_error": "Failed to prepare to deploy: Redfish exception occurred. Error: Setting boot mode to uefi failed for node 9c1a786e-dc1c-41a0-90ff-03323efdefb2. Error: The parameter \"target\" value \"None\" is invalid. Valid values are: {'sd card', 'uefi http', 'bios setup', 'hdd', 'none', 'floppy', 'pxe', 'uefi target', 'utilities', 'cd'}",

Expected results:

Machine deploys.

Additional info:


In reviewing log data, we can see the BMC reply with a list of valid targets, however the list of targets that is returned excludes 

'BootSourceOverrideTarget': 'None', 'BootSourceOverrideTarget': ['None', 'Pxe', 'Cd', 'Floppy', 'Hdd', 'BiosSetup', 'Utilities', 'UefiTarget', 'SDCard', 'UefiHttp']

Note: there is some field text mapping that occurs here, but regardless we can see 'None' is getting stripped.

This was patched upstream, however a series of backports are required to fix this issue.

https://storyboard.openstack.org/#!/story/2006641
https://storyboard.openstack.org/#!/story/2007216

Train backports:
https://review.opendev.org/#/c/707508/1
https://review.opendev.org/#/c/707511/1
https://review.opendev.org/#/c/707512/1

Comment 4 Raviv Bar-Tal 2020-03-29 08:38:00 UTC
This specific problem is related to hardware we don't have in our lab.
The code was added and merged.
If this problem still and issue, Please open new BZ

Comment 7 errata-xmlrpc 2020-05-04 11:36:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0581


Note You need to log in before you can comment on or make changes to this bug.