Skip to content

1120: Check PowerSupply availability prop for State/Hlth #1281

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

Conversation

baemyung
Copy link
Contributor

@baemyung baemyung commented May 8, 2025

This commit makes use of the Available property on the power supply D-Bus object when determining the power supply state and health in the PowerSupply response. The power supply monitor code from phosphor-power will set the property to false if it can determine that the power supply isn't able to provide power due to certain faults.

If the PS isn't available, then the Health property will be set to Critical, and the State will be set to UnavailableOffline (assuming it shouldn't be Absent instead).

This is necessary because on IBM systems the Functional property determines the fault LED state as well as the health value, and in certain cases the fault LED needs to stay off even though the PS health is not OK. A specific example of this is when the PS cord is unplugged: no fault LED is desired but it is desired for the Redfish output to show that there is an issue with the PS.

If the Available property isn't present on D-Bus, it acts as if it had a value of true and behaves the same as it does today.

Tested:
Available = false:
"Health": "Critical",
"State": "UnavailableOffline"

Available = true, Functional = false:
"Health": "Critical",
"State": "Enabled"

PS missing:
"Health": "Critical",
"State": "Absent"

Everything OK:
"Health": "OK",
"State": "Enabled"

No Available property on D-Bus:
"Health": "OK",
"State": "Enabled"

Change-Id: I1a3194bf3a6ca3936954b31439070dcc2f343411

@baemyung baemyung requested review from gtmills and jeaaustx May 8, 2025 20:47
@baemyung baemyung force-pushed the 1120-Check-PowerSupply-Availability-for-StateAndHealth branch 2 times, most recently from 2adf3bf to 04b1619 Compare May 9, 2025 14:51
@baemyung
Copy link
Contributor Author

baemyung commented May 9, 2025

@baemyung baemyung force-pushed the 1120-Check-PowerSupply-Availability-for-StateAndHealth branch from 04b1619 to 9123781 Compare May 9, 2025 20:49
@gtmills
Copy link
Contributor

gtmills commented May 14, 2025

jenkins run tests please

@baemyung
Copy link
Contributor Author

Currently all BMCWEB PRs are failing because of IBM systems routing issue - which blocks to access

wget https://redfish.dmtf.org/

The related threads are

@baemyung
Copy link
Contributor Author

Once #1285 is merged, this will be rebased

This commit makes use of the Available property on the power supply
D-Bus object when determining the power supply state and health in the
PowerSupply response.  The power supply monitor code from phosphor-power
will set the property to false if it can determine that the power supply
isn't able to provide power due to certain faults.

If the PS isn't available, then the Health property will be set to
Critical, and the State will be set to UnavailableOffline (assuming it
shouldn't be Absent instead).

This is necessary because on IBM systems the Functional property
determines the fault LED state as well as the health value, and in
certain cases the fault LED needs to stay off even though the PS health
is not OK.  A specific example of this is when the PS cord is unplugged:
no fault LED is desired but it is desired for the Redfish output to show
that there is an issue with the PS.

If the Available property isn't present on D-Bus, it acts as if it had a
value of true and behaves the same as it does today.

Tested:
Available = false:
    "Health": "Critical",
    "State": "UnavailableOffline"

Available = true, Functional = false:
    "Health": "Critical",
    "State": "Enabled"

PS missing:
    "Health": "Critical",
    "State": "Absent"

Everything OK:
    "Health": "OK",
    "State": "Enabled"

No Available property on D-Bus:
    "Health": "OK",
    "State": "Enabled"

Change-Id: I1a3194bf3a6ca3936954b31439070dcc2f343411

Signed-off-by: Matt Spinler <[email protected]>
Signed-off-by: Myung Bae <[email protected]>
@baemyung baemyung force-pushed the 1120-Check-PowerSupply-Availability-for-StateAndHealth branch from 9123781 to 4e29432 Compare May 14, 2025 17:35
@rfrandse rfrandse merged commit 71f0ad1 into ibm-openbmc:1120 May 14, 2025
1 check passed
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.

5 participants