Skip to contentSkip to conversation

Read-Only IPMI sensors

DISCUSSION Adriana Kobylak 3 participants 4 messages Aug 13, 2018 – Aug 14, 2018

lore
Share & tools
lore
#0 lore raw

There are a couple IPMI sensors that are not yet included in the data-driven design of IPMI because they're intended to be read-only (example: https://github.com/openbmc/openbmc/issues/2154).

Some options to implement these:

1. Add support in sdbusplus for read-only properties and map these sensors to a read-only d-bus property.

2. Have a (json?) file with the sensor settings and have IPMI and any other interested apps read the file directly to retrieve the sensor values.

3. Add read-only sensors to a d-bus object and override the "setter" function to be a no-op to prevent the value from being modified.

4. Combination of above / other options.

Thoughts?

#1 lore raw
Quoted 6 lines · Adriana Kobylak

There are a couple IPMI sensors that are not yet included in the data-driven design of IPMI because they're intended to be read-only (example: https://github.com/openbmc/openbmc/issues/2154).

Some options to implement these:

1. Add support in sdbusplus for read-only properties and map these sensors to a read-only d-bus property.

sdbusplus-asio already has support for read-only properties that you might be interested in using / duplicating: https://github.com/openbmc/sdbusplus/blob/master/sdbusplus/asio/object_server.hpp#L123

Quoted 8 lines

2. Have a (json?) file with the sensor settings and have IPMI and any other interested apps read the file directly to retrieve the sensor values.

3. Add read-only sensors to a d-bus object and override the "setter" function to be a no-op to prevent the value from being modified.

4. Combination of above / other options.

Thoughts?

#2 lore raw

host-ipmid also already supports read-only, in fact, adding writable support was a pretty big work item last year. When you say data-driven design do you mean the automatic discovery? I guess I'm a little confused as to what exactly is missing for you.

Quoted 30 lines · James Feist
Quoted 9 lines · Adriana Kobylak

There are a couple IPMI sensors that are not yet included in the data-driven design of IPMI because they're intended to be read-only (example: https://github.com/openbmc/openbmc/issues/2154).

Some options to implement these:

1. Add support in sdbusplus for read-only properties and map these sensors to a read-only d-bus property.

sdbusplus-asio already has support for read-only properties that you might be interested in using / duplicating:

https://github.com/openbmc/sdbusplus/blob/master/sdbusplus/asio/object_server.hpp#L123

Quoted 2 lines

2. Have a (json?) file with the sensor settings and have IPMI and any other interested apps read the file directly to retrieve the sensor

values.

Quoted 8 lines

3. Add read-only sensors to a d-bus object and override the "setter" function to be a no-op to prevent the value from being modified.

4. Combination of above / other options.

Thoughts?

#3 lore raw
Quoted 5 lines · Emily Shaffer

host-ipmid also already supports read-only, in fact, adding writable support was a pretty big work item last year. When you say data-driven design do you mean the automatic discovery? I guess I'm a little confused as to what exactly is missing for you.

Yeah, by data-driven I mean the phosphor-ipmi-sensor-inventory%/config.yaml files in the openbmc repo where a sensor is matched to a D-Bus object. For example if we create a property under the Settings D-Bus object for the derating factor sensor, and add this object to the ipmi config.yaml file, a Set Sensor would be able to change its value, unless the host-ipmid read-only support prevents this. What is the read-only support in ipmi?

Quoted 10 lines
Quoted 4 lines · James Feist

sdbusplus-asio already has support for read-only properties that you
might be interested in using / duplicating:

https://github.com/openbmc/sdbusplus/blob/master/sdbusplus/asio/object_server.hpp#L123

Quoted 2 lines

[2]

Thanks, will take a look, since we want read-only properties in sdbusplus regardless if they'll be used by ipmi.