All of lore.kernel.org
 help / color / mirror / Atom feed
* phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan
@ 2020-12-16  8:03 Thu Nguyen
  2020-12-16 22:03 ` Matthew Barth
  0 siblings, 1 reply; 4+ messages in thread
From: Thu Nguyen @ 2020-12-16  8:03 UTC (permalink / raw)
  To: openbmc

Hi,


In the current code of phosphor-hwmon, when flag 
--enable-update-functional-on-fail is set. The fan functional DBus 
property in sensors interface will be set to false when unplug fans 
(FAN4_2).

~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
/xyz/openbmc_project/sensors/fan_tach/FAN4_2 
xyz.openbmc_project.State.Decorator.OperationalStatus Functional
b false

AND the fan Value properties will keep the latest reading value before 
unplug.

~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
/xyz/openbmc_project/sensors/fan_tach/FAN4_2 
xyz.openbmc_project.Sensor.Value Value

d 4794

~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
/xyz/openbmc_project/sensors/fan_tach/FAN4_2 
xyz.openbmc_project.Sensor.Value Value
d 4794

This cause phosphor-fan-monitor failed to detect the fan failure so the 
fan functional are wrong.

busctl get-property xyz.openbmc_project.Inventory.Manager 
/xyz/openbmc_project/inventory/system/chassis/motherboard/FAN4_2 
xyz.openbmc_project.State.Decorator.OperationalStatus Functional
b true

Should phosphor-hwmon keep updating the fan value Dbus properties with 
error code when the fans is nonfunctional? Or phosphor-fan-monitor 
should also check the fan functional in sensor interface to update fan 
functional in inventory interface?


Regards.

Thu Nguyen.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan
  2020-12-16  8:03 phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan Thu Nguyen
@ 2020-12-16 22:03 ` Matthew Barth
  2020-12-17  2:23   ` Thu Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Barth @ 2020-12-16 22:03 UTC (permalink / raw)
  To: Thu Nguyen, openbmc


On 12/16/20 2:03 AM, Thu Nguyen wrote:
> Hi,
>
>
> In the current code of phosphor-hwmon, when flag 
> --enable-update-functional-on-fail is set. The fan functional DBus 
> property in sensors interface will be set to false when unplug fans 
> (FAN4_2).
>
> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
> b false
>
> AND the fan Value properties will keep the latest reading value before 
> unplug.
>
> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
> xyz.openbmc_project.Sensor.Value Value
>
> d 4794
>
> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
> xyz.openbmc_project.Sensor.Value Value
> d 4794
>
> This cause phosphor-fan-monitor failed to detect the fan failure so 
> the fan functional are wrong.
>
> busctl get-property xyz.openbmc_project.Inventory.Manager 
> /xyz/openbmc_project/inventory/system/chassis/motherboard/FAN4_2 
> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
> b true
>
> Should phosphor-hwmon keep updating the fan value Dbus properties with 
> error code when the fans is nonfunctional? Or phosphor-fan-monitor 
> should also check the fan functional in sensor interface to update fan 
> functional in inventory interface?
>
I recall this was something that would be needed in phosphor-fan-monitor 
when a fan's sensor is marked faulted since the value should no longer 
be trusted by phosphor-fan-monitor. A phosphor-fan-monitor configuration 
option needs to be added per fan sensor to check the sensor's functional 
property and use that to update the fan's functional state in inventory 
as well.

Please feel free to submit a patch to add this configuration option to 
drive setting the fan's functional state in inventory based on the state 
of a fan sensor's functional state.


Matt

>
> Regards.
>
> Thu Nguyen.
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan
  2020-12-16 22:03 ` Matthew Barth
@ 2020-12-17  2:23   ` Thu Nguyen
  2020-12-29  6:05     ` Matthew Barth
  0 siblings, 1 reply; 4+ messages in thread
From: Thu Nguyen @ 2020-12-17  2:23 UTC (permalink / raw)
  To: Matthew Barth, openbmc

[-- Attachment #1: Type: text/plain, Size: 2892 bytes --]

On 12/17/20 05:03, Matthew Barth wrote:
>
> On 12/16/20 2:03 AM, Thu Nguyen wrote:
>> Hi,
>>
>>
>> In the current code of phosphor-hwmon, when flag 
>> --enable-update-functional-on-fail is set. The fan functional DBus 
>> property in sensors interface will be set to false when unplug fans 
>> (FAN4_2).
>>
>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
>> b false
>>
>> AND the fan Value properties will keep the latest reading value 
>> before unplug.
>>
>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>> xyz.openbmc_project.Sensor.Value Value
>>
>> d 4794
>>
>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>> xyz.openbmc_project.Sensor.Value Value
>> d 4794
>>
>> This cause phosphor-fan-monitor failed to detect the fan failure so 
>> the fan functional are wrong.
>>
>> busctl get-property xyz.openbmc_project.Inventory.Manager 
>> /xyz/openbmc_project/inventory/system/chassis/motherboard/FAN4_2 
>> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
>> b true
>>
>> Should phosphor-hwmon keep updating the fan value Dbus properties 
>> with error code when the fans is nonfunctional? Or 
>> phosphor-fan-monitor should also check the fan functional in sensor 
>> interface to update fan functional in inventory interface?
>>
> I recall this was something that would be needed in 
> phosphor-fan-monitor when a fan's sensor is marked faulted since the 
> value should no longer be trusted by phosphor-fan-monitor. A 
> phosphor-fan-monitor configuration option needs to be added per fan 
> sensor to check the sensor's functional property and use that to 
> update the fan's functional state in inventory as well.
>
> Please feel free to submit a patch to add this configuration option to 
> drive setting the fan's functional state in inventory based on the 
> state of a fan sensor's functional state.
>
>
> Matt
>
>>
>> Regards.
>>
>> Thu Nguyen.
>>
>>
>>
How about Fan Present property? Should we update it to false when fan 
sensor functional is false?

I think we can add option "fan_sensor_func_to_fan_inventory_func" in fan 
configuration as below:

- inventory: /system/chassis/motherboard/FAN3_1
allowed_out_of_range_time: 30
deviation: 15
num_sensors_nonfunc_for_fan_nonfunc: 1
fan_sensor_func_to_fan_inventory_func: true
sensors:
- name: FAN3_1
has_target: true
target_interface: xyz.openbmc_project.Control.FanPwm
factor: 82
offset: 0

In phosphor-fan-monitor, for each fan, we will signal the fan functional 
property in sensor, and update the fan function in inventory when that 
property is changed. Maybe we should update fan present in inventory also.


Thu Nguyen


[-- Attachment #2: Type: text/html, Size: 5968 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan
  2020-12-17  2:23   ` Thu Nguyen
@ 2020-12-29  6:05     ` Matthew Barth
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Barth @ 2020-12-29  6:05 UTC (permalink / raw)
  To: Thu Nguyen, openbmc

[-- Attachment #1: Type: text/plain, Size: 4110 bytes --]


On 12/16/20 8:23 PM, Thu Nguyen wrote:
> On 12/17/20 05:03, Matthew Barth wrote: On 12/16/20 2:03 AM,...
> This Message Is From an External Sender
> This message came from outside your organization.
>
> On 12/17/20 05:03, Matthew Barth wrote:
>>
>> On 12/16/20 2:03 AM, Thu Nguyen wrote:
>>> Hi,
>>>
>>>
>>> In the current code of phosphor-hwmon, when flag 
>>> --enable-update-functional-on-fail is set. The fan functional DBus 
>>> property in sensors interface will be set to false when unplug fans 
>>> (FAN4_2).
>>>
>>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>>> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
>>> b false
>>>
>>> AND the fan Value properties will keep the latest reading value 
>>> before unplug.
>>>
>>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>>> xyz.openbmc_project.Sensor.Value Value
>>>
>>> d 4794
>>>
>>> ~# busctl get-property xyz.openbmc_project.Hwmon-1644477290.Hwmon1 
>>> /xyz/openbmc_project/sensors/fan_tach/FAN4_2 
>>> xyz.openbmc_project.Sensor.Value Value
>>> d 4794
>>>
>>> This cause phosphor-fan-monitor failed to detect the fan failure so 
>>> the fan functional are wrong.
>>>
>>> busctl get-property xyz.openbmc_project.Inventory.Manager 
>>> /xyz/openbmc_project/inventory/system/chassis/motherboard/FAN4_2 
>>> xyz.openbmc_project.State.Decorator.OperationalStatus Functional
>>> b true
>>>
>>> Should phosphor-hwmon keep updating the fan value Dbus properties 
>>> with error code when the fans is nonfunctional? Or 
>>> phosphor-fan-monitor should also check the fan functional in sensor 
>>> interface to update fan functional in inventory interface?
>>>
>> I recall this was something that would be needed in 
>> phosphor-fan-monitor when a fan's sensor is marked faulted since the 
>> value should no longer be trusted by phosphor-fan-monitor. A 
>> phosphor-fan-monitor configuration option needs to be added per fan 
>> sensor to check the sensor's functional property and use that to 
>> update the fan's functional state in inventory as well.
>>
>> Please feel free to submit a patch to add this configuration option 
>> to drive setting the fan's functional state in inventory based on the 
>> state of a fan sensor's functional state.
>>
>>
>> Matt
>>
>>>
>>> Regards.
>>>
>>> Thu Nguyen.
>>>
>>>
>>>
> How about Fan Present property? Should we update it to false when fan 
> sensor functional is false?
>
No. These are states with different meanings...a fan's present state 
should not be associated with a fan sensor's functional state. There is 
a case where these may be linked when the sensor device is included in 
the fan FRU itself, however, I would see them being handled by their 
respective applications to update those different states accordingly 
anyways.
>
> I think we can add option "fan_sensor_func_to_fan_inventory_func" in 
> fan configuration as below:
>
> - inventory: /system/chassis/motherboard/FAN3_1
> allowed_out_of_range_time: 30
> deviation: 15
> num_sensors_nonfunc_for_fan_nonfunc: 1
> fan_sensor_func_to_fan_inventory_func: true
> sensors:
> - name: FAN3_1
> has_target: true
> target_interface: xyz.openbmc_project.Control.FanPwm
> factor: 82
> offset: 0
>
> In phosphor-fan-monitor, for each fan, we will signal the fan 
> functional property in sensor, and update the fan function in 
> inventory when that property is changed. Maybe we should update fan 
> present in inventory also.
>
I'd prefer this to be the default and provide a configuration option to 
decouple the fan rotor's functional state from the state of its 
associated sensor(s). In most cases, the sensor being nonfunctional 
should therefore set the fan rotor's functional state to nonfunctional 
when the configuration option to disable this association is not given. 
This optional configuration to disable the sensor-to-fan rotor 
functional association should be supported for each sensor listed per 
fan in the fan monitor configuration file.


Matt

>
> Thu Nguyen
>

[-- Attachment #2: Type: text/html, Size: 11698 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-29  6:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16  8:03 phosphor-hwmon + phosphor-fan: Fan functional properties are mismatched when unplug fan Thu Nguyen
2020-12-16 22:03 ` Matthew Barth
2020-12-17  2:23   ` Thu Nguyen
2020-12-29  6:05     ` Matthew Barth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.