wspoon: Improve fan error resolving rules

The previous phosphor-dbus-monitor rules would only watch
for the functional property to change on a fan, and then
resolve errors for that fan if the property changed to true.

This change will watch for both present and functional property
changes, and resolve fan errors if both properties are true at
that time.

This closes the window of where if a fan is removed long enough for
the present property to change to false but replaced fast enough
that the functional property always stays true then the NotPresent
error that was created will never get resolved so the fault LEDs
won't turn off.

Resolves openbmc/openbmc#3231

Tested: Various combinations of Present/Functional property state
        changes and also fan plugs/unplugs.

Change-Id: I3255c0510b95509810b018a2a71d307bd7d4a946
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed