9bab9e10 | 24-Feb-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
psu-ng: Get max PSU number from entity manager
Read the max number of PSUs supported from entity manager instead of JSON since entity manager would have the value based on system. If the entity mana
psu-ng: Get max PSU number from entity manager
Read the max number of PSUs supported from entity manager instead of JSON since entity manager would have the value based on system. If the entity manager interface does not exist by the time the psu manager starts, subscribe to interfaces added. The psu manager can take action once the max count property is available on D-Bus.
Tested: On Rainier 2U with debug traces: 1. Restarted phosphor-psu-monitor and verified maxPowerSupplies was 2. 2. Stopped xyz.openbmc_project.Inventory.Manager. Restarted phosphor-psu-monitor and verified maxPowerSupplies was 0. 3. Started xyz.openbmc_project.Inventory.Manager and verified the psu callback was triggered setting maxPowerSupplies to 2. 4. Stopped and started xyz.openbmc_project.Inventory.Manager and verified the psu callback was not called again.
Change-Id: Ieff796ca5c79bfddc1fc6e15e339a0b15eb422d7 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
169975cf | 06-Mar-2021 |
Adriana Kobylak <anoo@us.ibm.com> |
psu-ng: Remove Min Power Supplies and cleanup
The psu manager would not prevent a power on based on the number of power supplies, it's only concerned about the max number so that if the number of pl
psu-ng: Remove Min Power Supplies and cleanup
The psu manager would not prevent a power on based on the number of power supplies, it's only concerned about the max number so that if the number of plugged power supplies is less than the specified max, then it can take action such as log an error.
Therefore there's not a current use case for the min setting, so removing it.
Also cleanup the function that parses that information from the JSON config file, like removing passing parameters that are class members, and adding a doxygen description. In addition, have the structure of system properties as part of the class instead of individual variables, since it's duplicate work to set the structure values then set the individual variables.
Tested: With debug traces verified that maxPowerSupplies was set to 2 which is the value in the JSON config file.
Change-Id: Id98900d213fcbef38dc3879b425161a8af172716 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
show more ...
|
9a507db5 | 25-Feb-2021 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Fix for interfacesAdded
The presentAddedMatch was not properly being triggered when the power supply interfaces was added in order to populate the Present property. The method used for added
psu-ng: Fix for interfacesAdded
The presentAddedMatch was not properly being triggered when the power supply interfaces was added in order to populate the Present property. The method used for added is different from when it is changed. Add in a function to handle when the inventory interface is added with the Present property.
Tested: In simulator, on startup, check journal for power supply present. obmcutil poweron Verify no error logged for missing power supply Remove power supply Verify journal shows driver missing, driver unbound. Verify error logged for missing power supply. Install power supply Verify journal shows driver bound for present power supply. obmcutil poweroff Delete error for missing power supply. obmcutil poweron Verify no error logged for missing power supply.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I70daeac597bdbdc9f069459707768a45edfa7ef2
show more ...
|
5474c91a | 23-Feb-2021 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Not clearing faults if power supply missing
The faultLogged variable is not set to false when clearFaults() is called if the power supply is not present. This variable is checked to see if a
psu-ng: Not clearing faults if power supply missing
The faultLogged variable is not set to false when clearFaults() is called if the power supply is not present. This variable is checked to see if an error should be logged if the power supply is not present. Always clear this variable, to allow for logging a new error on power state changes from off to on.
Tested: obmcutil poweron with all power supplies present. Remove power supply, verify error logged for missing power supply. obmcutil poweroff obmcutil poweron Verify new error logged for missing power supply.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ibb12fe90f0a22e7c44144d4d5516fedff35a4e12
show more ...
|
10d94055 | 30-Nov-2020 |
Jay Meyer <jaymeyer@us.ibm.com> |
Capture PSU STATUS_MFR_SPECIFIC during analysis
If there is a fault indicated in STATUS_WORD, add the STATUS_MFR_SPECIFIC value to the error log additional data. For additional diagnostic informatio
Capture PSU STATUS_MFR_SPECIFIC during analysis
If there is a fault indicated in STATUS_WORD, add the STATUS_MFR_SPECIFIC value to the error log additional data. For additional diagnostic information, include the MFR status for all log entries when status word is nonzero. Change the journal entry for MFR fault to an error type, suggested in code review.
Tested: Test by setting the bit in the PMBus status word in simulation for MFR and a nonzero value in STATUS_MFR_SPECIFIC. The chassis is on during this test. This change also adds the MFR status in journal entries. The journal contains an entry like this for the MFR fault: MFR fault: status word = 0x01 MFR fault = 0x1 Other journal entries: VIN_UV fault: status word = 0x08, MFR fault = 0x1 INPUT fault: status word = 0x02, MFR fault = 0x1 Note: definitions for INPUT_FAULT_WARN and MFR_SPECIFIC_FAULT were changed for testing purposes because the simulator could not set the upper bits of the status word.
Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com> Change-Id: Ib63ca6581c72f640aba01a95c6fe02b26ac8c1ee
show more ...
|
df13c3ab | 15-Dec-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: inventoryPath in updatePresence fail
If the updatePresence() function fails on the getPresence() function call, include the inventoryPath string in the message logged to the journal.
Signed
psu-ng: inventoryPath in updatePresence fail
If the updatePresence() function fails on the getPresence() function call, include the inventoryPath string in the message logged to the journal.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I91e361fe404c01cf39e51e7f03f934bf945179a6
show more ...
|
3180f4d4 | 08-Dec-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: PSU manager powerOn check for errors
Update the analyze function of the PSU manager to only create errors if the power is on.
Tested: Ran unit-tests for phosphor-power-supply - passed.
psu-ng: PSU manager powerOn check for errors
Update the analyze function of the PSU manager to only create errors if the power is on.
Tested: Ran unit-tests for phosphor-power-supply - passed. Tested in simulator for Rainier: - Redfish power on - Redfish power off - IPMI power on - Redfish power off - REST OBMC reboot (off) - Remove and install each power supply (off) - Verify no errors created.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I8c25b11dc0991bbdf61c1b83450ad68918be7309
show more ...
|
9564e945 | 10-Nov-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Updates to allow PSU missing on startup
If the power supply is missing when the application starts up, the created PMBus interface will log an INFO message about being unable to read any of
psu-ng: Updates to allow PSU missing on startup
If the power supply is missing when the application starts up, the created PMBus interface will log an INFO message about being unable to read any of the sysfs files. Allow that informational message to occur, but in the inventoryChange() interface, when the power supply goes present, be sure to call the findHwmonDir() function to update the directory/file changes that may occur when the device driver binds.
Tested: Use simulator to verify no changes when both present and chassison. Use simulator to mark 2nd PSU missing, restart application, mark 2nd PSU as present and verify no PSU communication problems. Use simulator to mark 1st PSU missing, restart application, mark 1st PSU present and verify no PSU communication problems. Use simulator to chassison with PSU missing, then change PSU present, verify no errors. Use simulator to chassison with PSUs present, mark PSU missing, then PSU present, verify no errors.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Iba1c8296167519e7285eb680ab067bfb6046b4c7
show more ...
|
1115153d | 10-Nov-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: clearFaults read only if present
Only attempt the in1_input read for clearFaults if the power supply is marked as being present.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id:
psu-ng: clearFaults read only if present
Only attempt the in1_input read for clearFaults if the power supply is marked as being present.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I15a1af419a101efbde95612614775fc976ab2a29
show more ...
|
070c1bc6 | 11-Oct-2020 |
George Liu <liuxiwei@inspur.com> |
Update OperationalStatus interface according to the Present property value
When the Present property value changes, the corresponding OperationalStatus interface needs to be updated at the same time
Update OperationalStatus interface according to the Present property value
When the Present property value changes, the corresponding OperationalStatus interface needs to be updated at the same time. Refer to: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/ openbmc_project/State/Decorator/OperationalStatus.interface.yaml
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I9eee9196125cf82605b20009b49a3ed7f65be53a
show more ...
|
c9efe415 | 09-Oct-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Store PSU firmware version in errors
If a power supply is reporting a fault, it could be related to the firmware version running on the supply. Add that information to the AdditionalData for
psu-ng: Store PSU firmware version in errors
If a power supply is reporting a fault, it could be related to the firmware version running on the supply. Add that information to the AdditionalData for most errors. The missing error likely does not have that updated, as you cannot read such information from a power supply that is not present.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I968d48a3a2f3a56e61789b8e4d9fb2312d504fc7
show more ...
|
4176d6be | 07-Oct-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Create error for communication fault
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I3f147063759559bf2486e78d9873c6d464381ddd |
f65c4060 | 19-Aug-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Limit tracing/logging read failures
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I433f164b82e9c5e6529d197354f4ab1169417540 |
52e54e87 | 08-Oct-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Log errors for missing power supplies
If a power supply is not present, create an error.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I8848f00572019588facbd44405e8d37d5106fb68 |
b76ab249 | 16-Sep-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Create errors for detected faults
Add in a function for creating errors using the Create D-Bus call.
Update the analyze function to create errors when faults are found.
We would want to lo
psu-ng: Create errors for detected faults
Add in a function for creating errors using the Create D-Bus call.
Update the analyze function to create errors when faults are found.
We would want to log a fault per power supply, so move the faultLogged concept down to the PowerSupply object itself.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I94d22b2b8a495abde87fb921c9177c6d25225ef7
show more ...
|
fed0ba29 | 26-Sep-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Make statusWord a member variable with accessor
The STATUS_WORD value read should be included in the PEL additional data when an error is logged. Make it a member variable of the PowerSupply
psu-ng: Make statusWord a member variable with accessor
The STATUS_WORD value read should be included in the PEL additional data when an error is logged. Make it a member variable of the PowerSupply class and provide an accessor function.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ief8b47e659a2fa6836d467339f2c0dd139c02e73
show more ...
|
7e49527c | 26-Sep-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Add accessor to get the inventory path
When creating errors, the inventory path may be needed for some of the call outs.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I545aae6
psu-ng: Add accessor to get the inventory path
When creating errors, the inventory path may be needed for some of the call outs.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I545aae603478e43909620b087c57ccd4b69d3eef
show more ...
|
63ea78b9 | 24-Sep-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Move analyze for PSUManager to cpp file
The analyze member function of the PSUManager class is a bit lengthy, and will have more code added in later commits. Moving it from the header file t
psu-ng: Move analyze for PSUManager to cpp file
The analyze member function of the PSUManager class is a bit lengthy, and will have more code added in later commits. Moving it from the header file to the source file.
Also making the namespace a one liner, since multi-line naming not really needed (at this time).
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ieb8c3343837ae6b5a633dcdb827f3c180156e4f1
show more ...
|
6a3fd2c2 | 25-Aug-2020 |
Jay Meyer <jaymeyer@us.ibm.com> |
Enhance PSU tracing support - add device access info
Move file names for file errors to the journal message. Enhance usablility.
Logging messages for file errors contain the file names inside struc
Enhance PSU tracing support - add device access info
Move file names for file errors to the journal message. Enhance usablility.
Logging messages for file errors contain the file names inside structured entries rather than directly in the log message. This makes viewing errors more difficult than need be. Before this change, the journal report needed to be run with '-o verbose' to see the file names.
Tested: Ran unit tests. All successful Tested: * Changes to phosphor-power-supply/main.cpp were tested by running with the .json configuration file missing in either and both default locations. * Change to loadJSONFromFile() in utility.cpp for an invalid file was tested by giving invalid "psu_config.json" file to main program. * Empty file message was tested by changing main() to allow loadJSONFromFile() to be called it when the file did not exist. * Changes to other files were tested by running phosphor-power initialization and manipulating the code to force execution of various error paths. * Methods that are changed but were not directly called by phosphor-power initialization: PMBus::readBit(), PMBus::readBinary() and PMBus::write(). The changed log messages in these were tested by adding calls to them from PMBus::read() and then changing code to force execution through paths that created the log messages.
Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com> Change-Id: I1f0c01716495ac7022d5234e9a8dfdab8195c186
show more ...
|
1d7a7df8 | 26-Mar-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Updates to get VPD data to inventory
Add in code to retrieve the VPD data and populate that data to the D-Bus inventory properties.
Use the PMBus utilities to retrieve the model (CCIN for I
psu-ng: Updates to get VPD data to inventory
Add in code to retrieve the VPD data and populate that data to the D-Bus inventory properties.
Use the PMBus utilities to retrieve the model (CCIN for IBM power supplies), part number, serial number, and firmware version information from the sysfs "files" provided via the device driver.
Only build in IBM VPD data collection and reporting if meson ran with -Dibm-vpd=true.
Tested: Copied SDK build of phospor-psu-monitor with -Dibm-vpd=true to Rainier hardware system, verified inventory properties updated/added.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I61688b154ead570e9d9390342596bf7d840f4dce
show more ...
|
da36455b | 26-Jun-2020 |
Jay Meyer <jaymeyer@us.ibm.com> |
Update psu poll rate for phosphor-power-supply.
Use a hard-coded poll rate rather than the configuration value from psu_config.json
Tested: Ran existing unit tests for phosphor-power with the build
Update psu poll rate for phosphor-power-supply.
Use a hard-coded poll rate rather than the configuration value from psu_config.json
Tested: Ran existing unit tests for phosphor-power with the build using meson -Doe-sdk=enabled -Dtests=enabled x86build Tested: Using a psu_config.json file that did not contain a poll rate, demonstrating that pollInterval is no longer needed. Tested: By adding temporary logging messages to verify successful startup without existence of pollInterval field.
Signed-off-by: Jay Meyer <jaymeyer@us.ibm.com> Change-Id: I969017c10474860f8b0a5f578a44a704c2f6a2e5
show more ...
|
59a35793 | 04-Jun-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Add code to set ON_OFF_CONFIG
Add code that sends the appropriate ON_OFF_CONFIG mask for the power supply power on operation.
Tested: Ran gtest using x86sdk Used simulator to change
psu-ng: Add code to set ON_OFF_CONFIG
Add code that sends the appropriate ON_OFF_CONFIG mask for the power supply power on operation.
Tested: Ran gtest using x86sdk Used simulator to change ON_OFF_CONFIG value, restarted service, verified ON_OFF_CONFIG changed. Used i2cget on hardware to change ON_OFF_CONFIG, restarted service, verified ON_OFF_CONFIG changed.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ifd9d63fcd2e86a62b7358e08958b5e2dbd21db9f
show more ...
|
3c208464 | 13-May-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Updates for clearFaults
It was discovered that the power supplies may not always have the in1_crit "file" available in the HWMON directory. This file may be missing if certain commands are n
psu-ng: Updates for clearFaults
It was discovered that the power supplies may not always have the in1_crit "file" available in the HWMON directory. This file may be missing if certain commands are not supported. It was also discovered that it can be missing if the power supply falsely indicates it supports PEC, but actually does not. Changing the readString call to read from the in1_input file, which typically should be present (READ_VIN).
Move the clearFaults function from the hpp file to the cpp file, as: 1. It is getting a bit lengthy. 2. Adding a try/catch for ReadFailure to avoid crashing the application if there is a ReadFailure, which is in the phosphor::logging namespace already used in the cpp file.
Update the test case to expect a read from in1_input, and return a value that more closely resembles an actual READ_VIN value.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I9747317c68040cdce6bb80922e3928be55376c44
show more ...
|
abe49418 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I96011a7be0c4577617fdbfcd95ffbc5a3177be49 |
4e016652 | 28-Apr-2020 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Clear fault bits in STATUS_WORD
Allow for clearing the fault bits in STATUS_WORD (and STATUS_BYTE) by having the clearFaults() function read from the in1_crit file in the hwmon directory.
S
psu-ng: Clear fault bits in STATUS_WORD
Allow for clearing the fault bits in STATUS_WORD (and STATUS_BYTE) by having the clearFaults() function read from the in1_crit file in the hwmon directory.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I1a3ad5c2402a61ff1172428085c4d707dc6166e4
show more ...
|