Bug 1874238

Summary: During idrac-virtualmedia install, ironic does not boot up the servers due to not including Location: in header _set_boot_device
Product: OpenShift Container Platform Reporter: rlopez
Component: Bare Metal Hardware ProvisioningAssignee: Derek Higgins <derekh>
Bare Metal Hardware Provisioning sub component: ironic QA Contact: Amit Ugol <augol>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: beth.white
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-01 16:35:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rlopez 2020-08-31 18:41:09 UTC
Description of problem:

RedFish virtualmedia with Dell servers using the idrac-virtualmedia option does not power on the systems due to missing location in header when setting boot device. 

The error:

2020-08-27 13:26:35.295 1 DEBUG ironic.drivers.modules.drac.boot [req-e258500d-b366-455c-8636-020f076a9117 - - - - -] Sushy OEM extension Python package 'sushy-oem-idrac' failed to set virtual boot device with system 4c4c4544-0048-3610-8056-b3c04f505832 manager 3258504f-c0b3-5680-3610-00484c4c4544 for node 170f99b8-82bb-4de5-8374-821f55f61865. Will try next manager, if available. Error: Sushy Extension Error: Response 202 to HTTP POST with args ('/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ImportSystemConfiguration',), kwargs {'data': {'ShareParameters': {'Target': 'ALL'}, 'ImportBuffer': '<SystemConfiguration><Component FQDD="iDRAC.Embedded.1"><Attribute Name="ServerBoot.1#BootOnce">Enabled</Attribute><Attribute Name="ServerBoot.1#FirstBootDevice">VCD-DVD</Attribute></Component></SystemConfiguration>'}} does not include Location: in header _set_boot_device /usr/lib/python3.6/site-packages/ironic/drivers/modules/drac/boot.py:144^[[00m


I've confirmed the workaround provided by Derek that modifying the following file within the ironic-conductor container fixes the issue in that it allows the Dell systems to power on. 

diff --git a/sushy_oem_idrac/asynchronous.py b/sushy_oem_idrac/asynchronous.py
index 4cfa763..881860d 100644
--- a/sushy_oem_idrac/asynchronous.py
+++ b/sushy_oem_idrac/asynchronous.py
@@ -42,8 +42,9 @@ def http_call(conn, method, *args, **kwargs):
     LOG.debug('Finished HTTP %s with args %s %s, response is '
               '%d', method, args or '', kwargs, response.status_code)
 
+    location = None
     while response.status_code == 202:
-        location = response.headers.get('location')
+        location = response.headers.get('location', location)
         if not location:
             raise sushy.exceptions.ExtensionError(
                 error='Response %d to HTTP %s with args %s, kwargs %s '

Comment 1 Beth White 2020-09-01 16:35:18 UTC

*** This bug has been marked as a duplicate of bug 1873487 ***