You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dell iDRAC9's (version 5.x or 6.x, does not appear to impact iDRAC8) return an error:
fatal: [x.x.x.x]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "msg": "HTTP Error 415 on POST request to 'https://REDACTED/redfish/v1/SessionService/Sessions', extended message: 'A general error has occurred. See Resolution for information on how to resolve the error.'"}
Testing manually (outside of Ansible) also returns an error:
{
"error": {
"code": "Base.1.5.GeneralError",
"message": "A general error has occurred. See ExtendedInfo for more information.",
"@Message.ExtendedInfo": {
"@odata.type": "#Message.v1_0_0.Message",
"MessageId": "Base.1.5.GeneralError",
"Message": "A general error has occurred. See Resolution for information on how to resolve the error.",
"Resolution": "Redfish request contains unsupported media type. Correct the request body and resubmit.",
"Severity": "Warning"
}
}
}
This appears to stem from the ansible module setting force_basic_auth = True as specified here:
iDRAC9's for unknown reasons will fail the session creation if basic_auth is enabled for the POST request. Ideally Dell would handle that differently, but is it possible to disable that flag for just the session creation task?
PLAY [Manager test] *************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [Create Redfish session] ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "HTTP Error 415 on POST request to 'https://REDACTED/redfish/v1/SessionService/Sessions', extended message: 'A general error has occurred. See Resolution for information on how to resolve the error.'"}
PLAY RECAP **********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
I suspect based on your debugging so far that the presence of the Authorization header (due to force_basic_auth being set to true) causes some services to reject the request. Providing an Authorization header while also providing credentials in the request body to make the session is unexpected. I can see cases where some services will ignore the header, and others that will err on the side of caution to raise this as a potential conflict; allowing both to pass through can give nondeterministic behavior (which credentials are consumed, the header's or the body's?). We don't have anything in the Redfish Specification as far as I can tell to recommend best practices, but specifically for Ansible, I think we should disable the force_basic_auth flag when performing the session creation request.
Summary
When attempting to create a Redfish Session as documented here:
community.general/plugins/modules/redfish_command.py
Lines 874 to 875 in fe520a6
Dell iDRAC9's (version 5.x or 6.x, does not appear to impact iDRAC8) return an error:
Testing manually (outside of Ansible) also returns an error:
This appears to stem from the ansible module setting
force_basic_auth = True
as specified here:community.general/plugins/module_utils/redfish_utils.py
Line 60 in a7783c4
iDRAC9's for unknown reasons will fail the session creation if basic_auth is enabled for the POST request. Ideally Dell would handle that differently, but is it possible to disable that flag for just the session creation task?
Issue Type
Bug Report
Component Name
redfish_utils.py
Ansible Version
Tested with:
and
Community.general Version
Tested with:
Configuration
OS / Environment
OSX 13.1
Ubuntu Focal
Steps to Reproduce
Expected Results
on an iDRAC 8 node:
Actual Results
On an iDRAC9 node:
Code of Conduct
The text was updated successfully, but these errors were encountered: