Fix PSU threshold mismatch issue

When trying to change thresholds on PSU sensors, PSU service will crash.
Some PSU in entity-manager will have threshold0 to threshodl5 which
contains all labels in one D-Bus path. But in current dbus sensors,
the presist threshold function do not support labels, it only check
severity. So when change a threshold in PSU sensor, it will change some
incorrect threshold in entity-manger. This patch adds label support to
presist threshold function, so that correct theshold in entity-manager
can be changed.

Tested:
After changed PSU1 Temp1 threshold by ipmitool, check the threshold again,
the value should be changed to the value we set. Check entity-manager,
the threshold in entity-manager should also change to the value we set.

Signed-off-by: Cheng C Yang <cheng.c.yang@linux.intel.com>
Change-Id: Ib1c8bb454cd42dff170ae33c4aa768c4b515bb44
6 files changed
tree: c5bd9ddcba901772dcb3a300db3df1e0589408a1
  1. cmake/
  2. include/
  3. service_files/
  4. src/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .gitignore
  9. cmake-format.json
  10. CMakeLists.txt
  11. Jenkinsfile
  12. LICENSE
  13. MAINTAINERS
  14. README.md
README.md

dbus-sensors

dbus-sensors is a collection of sensor applications that provide the xyz.openbmc_project.Sensor collection of interfaces. They read sensor values from hwmon, d-bus, or direct driver access to provide readings. Some advance non-sensor features such as fan presence, pwm control, and automatic cpu detection (x86) are also supported.

key features

  • runtime re-configurable from d-bus (entity-manager or the like)

  • isolated: each sensor type is isolated into its own daemon, so a bug in one sensor is unlikely to affect another, and single sensor modifications are possible

  • async single-threaded: uses sdbusplus/asio bindings

  • multiple data inputs: hwmon, d-bus, direct driver access