HwmonTempSensor: Watch for InterfacesRemoved

In the current code, if a temperature sensor is on a removable card and
that card is removed, hwmontempsensor does not know it has been removed
and will keep on trying to read the sensor, resulting in it reporting
the sensor is in error state (Value = NaN and
OperationalStatus.Functional = false).  This isn't ideal because a) The
device isn't in the system so why have a sensor for it and b) This error
reading implies there is something wrong when there isn't.

This commit adds support to remove the sensor from D-Bus when its entity
manager configuration interface has been removed from D-Bus, which
entity-manager will do when a currently passing probe statement no
longer passes.  This could happen, for example, when the EEPROM D-Bus
property it was matching on is removed from D-Bus by the daemon that
keeps EEPROM contents on D-Bus when it detects the EEPROM is no longer
there.

Tested: The D-Bus sensor lifetime matches the entity-manager
configuration object lifetime.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I2946e9adf8995abbfa977128a06a5eca84fb46f5
1 file changed
tree: 425caaac2ad5e3f5687e467d2440b479440a9742
  1. include/
  2. service_files/
  3. src/
  4. subprojects/
  5. tests/
  6. .clang-format
  7. .clang-ignore
  8. .clang-tidy
  9. .gitignore
  10. Jenkinsfile
  11. LICENSE
  12. MAINTAINERS
  13. meson.build
  14. meson_options.txt
  15. OWNERS
  16. 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

sensor documentation