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
Power cap setting is not working properly on Palmetto #42
Comments
Can you elaborate on this? What is specific to Barreleye? |
I discussed with Yi Li, he mentioned that in sensor_manager2.py, sysfs_attr is hardcoded to work for Barreleye platform, which should be different a path for palmetto platform.
|
Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. This would fix the issue: openbmc#42 Signed-off-by: Yi Li <adamliyi@msn.com>
Fixed here: #48 |
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. This would fix the issue: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. This would fix the issue: openbmc#43 Signed-off-by: Yi Li <adamliyi@msn.com>
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. This would fix the issue: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. This would fix the issue: openbmc#43 Signed-off-by: Yi Li <adamliyi@msn.com>
Resubmitted a PR to fix this issue: #50 |
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. This would fix the issue: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. Need to specify the exception name to trigger a '400' return code. This would fix the issue: openbmc#43 Signed-off-by: Yi Li <adamliyi@msn.com>
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. This would fix the issue: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. Need to specify the exception name to trigger a '400' return code. This would fix the issue: openbmc#43 Signed-off-by: Yi Li <adamliyi@msn.com>
If setting error, would expect an error code like bellow: curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d "{"data": [ 12000 ]}" https://9.3.23.24/org/openbmc/sensors/host/PowerCap/action/setValue |
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. Fixes: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. Need to specify the exception name to trigger a '400' return code. Fixes: openbmc#43 Add code to validate input user powercap value. Changed the logic of "reading powercap" using PowerCap.getValue(). Previously PowerCap.getValue() returns current user set powercap value. Now PowerCap.getValue() returns actual system powercap reading from OCC. Signed-off-by: Yi Li <adamliyi@msn.com>
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. Fixes: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. Need to specify the exception name to trigger a '400' return code. Fixes: openbmc#43 Add code to validate input user powercap value. Changed the logic of "reading powercap" using PowerCap.getValue(). Previously PowerCap.getValue() returns current user set powercap value. Now PowerCap.getValue() returns actual system powercap reading from OCC. Signed-off-by: Yi Li <adamliyi@msn.com>
@mkumatag , I just set up the environment on a Palmetto: 9.3.164.149 |
Tested on that machine and working fine. Get System Power Consumption :: Get the current system power consu... | PASS |Test Occ Powercap :: This suite is for testing OCC: Power capping ... | PASS | 6 tests total, 6 passed, 0 failedOutput: /home/manjunath/git/openbmc-automation/output.xml |
…ap object Currently master OCC hwmon sysfs path is hardcoded to '/sys/class/hwmon/hwmon3/'. This make the '/org/openbmc/sensors/host/PowerCap' interface cannot work when master OCC is initilized as hwmon device other than 'hwmon3'. 'usr_powercap' attribute should be searched when OCC is active. When skeleton creates 'PowerCap' objects, OCC may not be active. So do the search each time setting power cap. Raise an exception when there is no 'user_powercap' attribute. Fixes: openbmc#42 Also raise an exception when setting power cap fails. The exception will be returned to REST API caller. Need to specify the exception name to trigger a '400' return code. Fixes: openbmc#43 Add code to validate input user powercap value. Changed the logic of "reading powercap" using PowerCap.getValue(). Previously PowerCap.getValue() returns current user set powercap value. Now PowerCap.getValue() returns actual system powercap reading from OCC. Signed-off-by: Yi Li <adamliyi@msn.com>
Powercap settings are not really working properly on Palmetto box. Discussed with Yi LI - found to be code is written only for Barreleye and not dynamic enough to deal both platform.
The text was updated successfully, but these errors were encountered: