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

NAS-127613 / 24.10 / Add ES24N sensor support #13936

Merged
merged 4 commits into from
Jun 28, 2024
Merged

NAS-127613 / 24.10 / Add ES24N sensor support #13936

merged 4 commits into from
Jun 28, 2024

Conversation

bmeagherix
Copy link
Contributor

@bmeagherix bmeagherix commented Jun 26, 2024

Make map_jbof async and process JBOFs in parallel.

Refactor code and in an async map_jbof now call map_es24n in parallel. This will use the new AsyncRedfishClient (being added in PR #13913) to obtain various information from the JBOF redfish interface, which will then be mapped to a similar dict as is done for other enclosure types.

This commit adds "Power Supply", "Cooling", "Temperature Sensors" and "Voltage Sensor" to the elements returned by map_es24n (was already returning "Array Device Slot").

Abstracted out some strings from ElementStatus and ElementType to enums for reuse.

@bmeagherix bmeagherix self-assigned this Jun 26, 2024
@bugclerk
Copy link
Contributor

@bugclerk bugclerk changed the title Add ES24N sensor support NAS-127613 / 24.10 / Add ES24N sensor support Jun 26, 2024
@bmeagherix bmeagherix added the WIP label Jun 26, 2024
Also add RedfishStatusHealth and RedfishStatusState enums
Refactor code and in an async map_jbof now call map_es24n in parallel.
This will use the new AsyncRedfishClient to obtain various information
from the JBOF redfish interface, which will then be mapped to a similar
dict as is done for other enclosure types.

This commit adds "Power Supply", "Cooling", "Temperature Sensors" and
"Voltage Sensor" to the elements returned by map_es24n (was already
returning "Array Device Slot").
@bmeagherix bmeagherix removed the WIP label Jun 27, 2024
@bmeagherix bmeagherix requested a review from a team June 27, 2024 17:03
# FIXME: This function shouldn't exist and the OEM should fix
# this at some point. When they do (hopefully) fix the model,
# remove this function
expected_uri = '/redfish/v1/Chassis/2U24'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be defined as a constant?

@yocalebo
Copy link
Contributor

Something I've noticed and should be considered. This area of our code is called quite a bit so the more logging statements we add, the more our log files will be spammed. When I wrote map_es24n function, I explicitly didn't add a bunch of failures there so we didn't spam. I tried to only log when it an exception occurred. Seems like we log a bit more with these changes. It's not necessarily wrong, but it's something to keep in mind.

@bmeagherix bmeagherix merged commit b23b651 into master Jun 28, 2024
3 checks passed
@bmeagherix bmeagherix deleted the NAS-127613 branch June 28, 2024 13:39
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jun 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants