Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added workaround and warnings for session login when the service incorrectly does not provide the session location in the 'Location' response header #177

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

mraineri
Copy link
Contributor

Fix #172

After discussing this with others in the forum, we think it's beneficial to automate a workaround (and print warnings about the non-conformance). The Redfish-Protocol-Validator already flags this as an error, so vendors can test for it today.

…rrectly does not provide the session location in the 'Location' response header

Signed-off-by: Mike Raineri <[email protected]>
@mraineri
Copy link
Contributor Author

mraineri commented Mar 18, 2025

@mateusrissi FYI, hopefully this gets you unstuck so you do not need to have your own patch (at least local testing and mockups to inject the failure look good)

@mateusrissi
Copy link

Hi there!

Yes! it looks good.

[2025-03-19 20:06:08 +0000] [33] [INFO] Attempt 1 of /redfish/v1/
[2025-03-19 20:06:09 +0000] [33] [INFO] Response Time for GET to /redfish/v1/: 0.6414591311477125 seconds.
[2025-03-19 20:06:09 +0000] [33] [INFO] Attempt 1 of /redfish/v1/SessionService/Sessions
[2025-03-19 20:06:09 +0000] [33] [INFO] Response Time for POST to /redfish/v1/SessionService/Sessions: 0.08219666732475162 seconds.
[2025-03-19 20:06:09 +0000] [33] [INFO] Login returned code 201: {
    "@odata.context": "/redfish/v1/$metadata#Session.Session",
    "@odata.id": "/redfish/v1/SessionService/Sessions/7",
    "@odata.type": "#Session.v1_3_0.Session",
    "Description": "User Session",
    "Id": "7",
    "Name": "User Session",
    "UserName": "user"
}
[2025-03-19 20:06:09 +0000] [33] [INFO] Healthcheck OK!
[2025-03-19 20:06:09 +0000] [33] [INFO] Attempt 1 of /redfish/v1/SessionService/Sessions/7
[2025-03-19 20:06:11 +0000] [33] [INFO] Response Time for DELETE to /redfish/v1/SessionService/Sessions/7: 2.0127207920886576 seconds.
[2025-03-19 20:06:11 +0000] [33] [INFO] User logged out:
[2025-03-19 20:06:11 +0000] [33] [INFO] 127.0.0.1:54352 - "GET /health HTTP/1.1" 200

The warning is there and I'm able to logout successfully.

Much thanks! Looking forward for the next release!

@mraineri
Copy link
Contributor Author

Approved 3/21

@mraineri mraineri merged commit 0a9c002 into main Mar 21, 2025
3 checks passed
@mraineri mraineri deleted the Fix172-Workaround-For-Location-Header branch March 21, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redfish API Logout rises exception on Dell PowerVault ME5024 due to missing session_location
2 participants