Behavior change for sensor read failures (phosphor-hwmon / phosphor-host-ipmid)

Brandon Kim brandonkim at google.com
Tue Jun 25 15:30:20 AEST 2019


Hello everyone,

I'm working on an alternative to NEGATIVE_ERRNO_ON_FAIL for sensor read
failures <https://github.com/openbmc/phosphor-hwmon/issues/10>.

I'm hoping to change the default behavior of phosphor-host-ipmid upon
sensor read failures and wanted to receive some feedback:

Currently if there's a fault file and it returns a fault, phosphor-hwmon
does not update the sensor value on D-Bus. However, phosphor-host-ipmid's
request will succeed (*return* *IPMI_CC_OK and a stale sensor value*) since
the device is left on D-Bus by default.

The new default behavior:

   - We will always have an OperationalState interface with Functional
   property for each Sensor.Value
   - If a fault file with fault has been detected, Functional property will
   be set to false
      - If UPDATE_FUNCTIONAL_ON_FAIL build switch is defined, Functional
      will be updated to false upon sensor read failures as well
   - phosphor-host-ipmid will read this Functional property when performing
   a Sensor.Value read
      - If the Functional property is false, phosphor-host-ipmid will
      return *IPMI_CC_SENSOR_INVALID and fail*


The main difference is that phosphor-host-ipmid will be performing an extra
property read to see if a sensor is `Functional` for Sensor.Value and
returning a failure IPMI code instead of a stale sensor value when sensor
has a fault.

You can find 3 open code reviews under this topic <
https://gerrit.openbmc-project.xyz/q/topic:%22Handle+Sensor.Value+read+failure%22+(status:open%20OR%20status:merged)
>

Thanks,
Brandon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190624/bd25ec4e/attachment.htm>


More information about the openbmc mailing list