-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adding PDU support #27
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ErwanAliasr1
force-pushed
the
pdu
branch
5 times, most recently
from
July 10, 2024 14:45
175fbca
to
ab30e99
Compare
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
anisse
reviewed
Jul 15, 2024
Custom vendors inherit from Vendor class. If the default init is override, it must call the parent class init to ensure all vendors behave the same. Signed-off-by: Erwan Velu <e.velu@criteo.com>
anisse
reviewed
Jul 15, 2024
The monitoring config file is fully dedicated to the BMC. This commit is about adding a "type" to each section to let room for future monitoring components like PDU, CDU etc.. This commit is adding "type=BMC" for the current BMC examples. The BMC code is also moved out of vendor.py to make it easier to read. Signed-off-by: Erwan Velu <e.velu@criteo.com>
Future work to add different type of monitoring devices like PDUs, CDUs, etc.. requires a generic class to share some behavior. This commit is moving parts of the BMC class into the generic MonitoringDevice one. It also creates a new find_sections() function to make the lookup of given type of MonitoringDevice inside the configuration file. Signed-off-by: Erwan Velu <e.velu@criteo.com>
The current code is using get_ip() to retrieve BMC IP. It uses ipmitool or ilorest to detect the BMC ip address. This is a limitation since we possibly want to force the url instead of an autodetect. This commit is : - renaming get_ip() to get_url() All drivers must return the BMC url and not its IP address - ensure that BMC.get_url() returns an https:// string instead of an IP addr - removes the "https://" append in connect_redfish() A test is now implemented to ensure drivers properly return a valid get_url() - allow url to be defined in the monitoring.cfg file This gives more flexibility for future usage. - add a mocked monitoring.cfg file A very simple configuration file is added to get the minimal BMC structure. Signed-off-by: Erwan Velu <e.velu@criteo.com>
This commit is about graphing PDU metrics. The commit is very light since it only requires adding PDU as a new source of power metrics and plot some specific graphs. The code is very light at PDUs are just an additional source of data in the existing data set. Signed-off-by: Erwan Velu <e.velu@criteo.com>
This commit add PDU as a type of monitoring device. A monitoring.md documentation is added to detail how the monitoring works and the way to use it. PDU monitoring is optional and needs to be defined inside the monitoring config file. It is possible to setup multiple PDUs configuration in the same file. This version implements a first driver for Raritan PDUs with Redfish API. At statup time the output looks like the following: Monitoring/PDU: initialize myPDUgroup with Raritan driver @ https://1url.pl/ Model: 'PX3-5722V-V2' FW: '4.2.0.5-50274' Serial: 'XXXXXXXXX' Monitoring/PDU: initialize myPDUdirect with Raritan driver @ https://url.pdu/ Model: 'PX3-5722V-V2' FW: '4.2.0.5-50274' Serial: 'XXXXXXXXX' Monitoring/BMC: Thermal metrics:1xCPU, 1xIntake Monitoring/BMC: Fans metrics:10xFan Monitoring/BMC: PowerConsumption metrics:65xCPU, 4xBMC Monitoring/BMC: PowerSupplies metrics:2xBMC Monitoring/PDU: PowerConsumption metrics:65xCPU, 4xBMC, 2xPDU On the implementation side, the vendor drivers, like Raritan here, are inheriting the PDU class and only override methods if necessary. Signed-off-by: Erwan Velu <e.velu@criteo.com>
anisse
approved these changes
Jul 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is about adding the PDU support to hwbench & hwgraph.
This first version supports Raritan PDUs but can be extended to other brands.