| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Sets the zone's fan speeds to a given speed when any service owner
associated with an event group is missing. Once all the services are
functional and providing the event data again, active fan speed changes
are allowed.
Change-Id: I318f6114c8d0392432c421f803db07a4683d1097
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An action to set the fan floor speed to the defined default fan floor
speed when any services associated to a given group of sensors have
terminated. Once those services are functional and providing the
sensors, the fan floor is allowed to be set normally again.
i.e.) For fan floor speeds based on an ambient sensor, if the service
providing the ambient temperature value from the sensor terminates, the
default floor for the zone is used as the fan floor speed.
Change-Id: I2d58cc9b31051e6b8e5e798c0a736f58f5efe5b1
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Add support for timer parameters to action functions along with
recursively build action functions that are a parameter to an event
action.
Change-Id: Ic126c8dfc85d5ede5f53034262f8910913e4cdd4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Move to constructing the entire event action parameter string within the
python code in prep for additional special parameters.
Change-Id: I517ad859813e348cd6781cc9be11ab92fa6cac09
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Another action is provided to the timer and is performed when the timer
expires.
Change-Id: Ie6a06b0d56272a158d74bf03287183f07f00aed8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Events defined to have timers require the ability to find a timer, add a
timer to the event, and removing a timer event entirely. These event
timers are intended to allow actions based on the event to be delayed or
recurring based on the timer defined.
Change-Id: Ieaf26f031c5e5aac9472e92354bfb76392642cb4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
This is the first step towards allowing timer driven and/or wrapped
actions where the timer interval and type will be defined by the user.
Change-Id: If008fda5a2b73117e869f93223e0bfe61290f858
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
A NameOwnerChanged signal message provides three strings containing the
service name that has changed along with its old service owner name and
new service owner name. These names are then passed along to the handler
to find/update the group associated with the changed owner name.
Change-Id: I7d67883b010fec5b282bd00a4dcc29629486af00
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The available event handlers are listed within the events yaml and would
be selected per event.
Change-Id: Ia393009b3a10b6f47f5de9a0e6d44f804576f05a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Adds a service name associated with a group when the group or given
service name is not found within the map of services otherwise updates
the service name owner associated with the group.
Change-Id: I602ddaa7e06e354e01ea70d6c5c0a45e74a14e99
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
NameOwnerChanged signals will be used within fan control to configure
set speed events for when services providing parameters to the fan
control application have unexpectedly terminated.
Change-Id: I04f3c7ca2842732e33dc94b0280ad4483f7f1286
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using a null dbus message to the event signal will perform the necessary
steps to initialize the event parameters using the given signal
handler's function directly.
i.e.) In the case for subscribing to PropertiesChanged signals,
initially the given property must be read. When the PropertiesChanged
signal struct is given a null message, it finds the property, reads the
value, and then can perform the given signal handler function directly.
This produces the same functional path as receiving a PropertiesChanged
signal containing the property value within the message.
Change-Id: I35575cfff66eb0305156be786cb1f5536d42bb1c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The available matches and their associated signals are now listed
within the events yaml and can be added to the list of matches to
register for per event.
Change-Id: I65f657038afe7c68a421adb4820ea09e275be06d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I260319dbfc4cb87bfed8fd724ffc4978f34e7325
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
| |
Action functions are not required to have parameters.
Change-Id: I04bf8294d9be9141cc7d8d3183628c94b777154a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This action function is intended to allow the base request speed to be
set to the max value from a group of properties. The base request speed
is the base speed used in requesting a new target speed. By default, the
base request speed is the current target speed.
For example, this action can be used to set the base request speed used
in calculating a new target speed to be based on the max tach feedback
speed from a group of fans instead of the current target speed.
Adding this action function requires the other non-template functions to
also be slightly modified due to linker errors.
Change-Id: Ibbe9b33678b10cb49466174088a587b27bf56d62
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
For increase and decrease speed changes, the new target speed is
calculated from either a set speed request base value or the current
target speed by default.
Change-Id: Iad1411437a9945af0b9ae85649d487e36586ef2a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The requested speed base is the speed value to base calculations for a
new target speed of increases or decreases from.
Change-Id: Iea413baa9c24c3240ddaf179b9faa259566f7e08
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Made updates to the example events.yaml to reflect the new format and
use.
Change-Id: I13b323487565f0c1c29eb97d9ddcf8da3295b21c
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Added some optimizations in the event yaml format to nest set speed
events that have the same preconditions and allow multiple actions to be
taken within a single set speed event.
Change-Id: I21ec395b6c9686e1efd5abc1be48d563480fec5f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Each set speed event will contain a list of one-to-many actions to
perform for the given event group's property. This reduces the amount of
code generated and properly handles property changed events against the
group.
Change-Id: If2b8c0d0b8ecf6e1c974c43d96e1c6e9e952022b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Fan control is allowed to have properties not be found, so log these as
informational for users. If the property is not found, then any set
speed events related to that property should handle it appropriately.
Resolves openbmc/openbmc#2188
Change-Id: I7c9e5fc8a3291d19ab4b1853af340643d3fa67a2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A zone is actively controlling its fan speeds when all groups subscribed
to allow active control are set to true. The zone keeps a list of these
groups and their active allow state, if at anytime an action (or
precondition) sets a group's active state to false, any dynamic set
speed requests do not occur. Only requests to set the zone's fans to
full speed is allowed.
Related to this, the zone's target speed should only be updated when a
requested speed is successfully set.
Change-Id: Iec6f15346fee5a6c6046d5b00e949e46aef400b9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For groups within set speed events where the property values of the
group may not signal its action to occur, an optional timer may be added
to the event. This timer is configured as a repeating timer on the
interval provided where upon timer expiration, the event's action is
run.
Change-Id: I4cbe8a0ab1b734bfc7828706a6515af7f6d78b52
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The factor parameter is used to correctly determine the increase or
decrease speed delta based on sensor inputs that have a scale. To get
the net speed delta change, the factor is applied to the difference in
sensor value and the defined state at which a speed change should be
requested.
Change-Id: I2aaa8f6b294b38d1f38238593dd851c3a205eb7a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
For each group in an event, subscribe to the interfacesAdded signals in
the case where the member(s) of a group may or may not exist when
initialized.
Additionally, updated to use the propertiesChanged function to remove
repetitive property change subscription lines generated.
Change-Id: I52b0cd839383ebb90e93a81b5bac02ee7c4f44b2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Update getting a property value from the zone's cache to throw an
exception when not found. Handle these exceptions appropriately for each
action where it gets each property value of a group.
Change-Id: Icbc0b04f492d3680de77dbe3f27cabf7504ce6b4
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set speed events are now allowed to have preconditions defined within
the event where those preconditions must be met before the set speed
event is enabled and active. The supported precondition added is against
a list of groups and their properties matching a given value.
The parser generates a precondition with the same layout as a set speed
event where the event is nested as the last parameter to the
precondition function. Having the set speed event as the last input
parameter to precondition functions is required.
Resolves openbmc/openbmc#1835
Change-Id: I7a247e7eb2d6b31ba9a60da1bc321a35edda9b24
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Allows the complete removal of a set speed event from the zone. This is
done when any precondition defined for the event to be active is not
met any longer.
Change-Id: Idbec357f76f0fd7db9107e8c9d3e00461872c528
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The property state check precondition validates that each given property
matches the defined value. When all the precondition groups' property
states match, the given set speed event is initialized and activated
allowing the zone speeds to be active controlled.
Change-Id: Ic16a0e1fc584c6fa695e354fa80fb1993002ffc7
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set speed events can not subscribe to InterfaceAdded signals for
properties that are created after fan control initializes the event. Fan
control subscribes to property changed signals for all events upon
startup where any properties that do not exist are unable to be
subscribed to and be notified when their property changes. Therefore,
subscribing to the InterfacesAdded signals for properties as well allows
any property defined within a set speed event that may not exist upon
starting the fan control application get added or updated when the
interface it resides on is added.
When a subscribed InterfacesAdded signal is caught, the same setProperty
handler function will be used to add the property value for the object
path, interface, and property name defined to be subscribed to for
property change signals.
Change-Id: If6fe97288140b83e2e2d735fdf61d52de1ec2e88
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Any defined preconditions for a set speed event must be satisfied prior
to configuring the event parameters for fan control. These preconditions
will accept a list of group entries that include the value the group's
property must be to have the precondition met for that group. Once all
preconditions are met, the set speed event will be initialized and
become active.
Change-Id: Ia5555be55c5937c891af527bea63da1546655b2f
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I30fdecd3af3dcdc7f954bdb9d535c6bc92edd67a
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support setting the increase delay time(in seconds) for each zone from
the zone yaml file. Speed increases use a delay type timer where the
amount of time given delays additional increase requests from happening
until the fans within the zone reach the highest net increase in speeds.
Support setting the decrease interval time(in seconds) for each zone
from the zone yaml file. Since decreasing is done on an interval, a
decrease interval time of zero disables the decrease interval timer
causing no decreases in speed to occur. Speed decreases use an interval
type timer to decrease the fan speeds within the zone when no speed
increase requests exist on the given time interval.
Change-Id: I88334a313b6e2820b768fa7e3f1cb65887f29258
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
When the floor speed updates, a request to increase the target speed
should be made when the target is now below the floor speed.
Change-Id: Ib622bc717a952ef0c0703cbff40a4dc14b213416
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A oneshot timer is started on each target speed increase where the
amount of time configured is how long the fans within the zone are
allowed to reach the new target speed before additional speed increase
requests will be processed. Any speed increase request deltas that are
above the current speed increase delta being processed as the new target
speed will cause the timer to stop and the difference between the deltas
are added onto the target speed.
Change-Id: I064941c4e12c3e44be90880d6f32c6fbcf7ae32d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I8a281935368cd705658d489c7c7af59b8dde7e4d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Create a repeating timer for decreasing fan speeds where the fan speeds
in the zone are decreased when the timer expires and a decrease speed
request exists with no increase request present or active.
Change-Id: I419592f6f50c0ed524f8bf3ebf183854ab5ef2ea
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A net decrease speed action determines the net decrease delta from each
group member's property value and requests a speed decrease of that
delta from the current target speed.
From all the requests for a speed decrease on a zone, only the lowest
net decrease is used from all the groups subscribed to decrease a zone's
speed. The new target speed is only decreased when no increase requests
exist and the resulting target is above the zone's floor speed,
otherwise the floor speed is set as the new target.
Resolves openbmc/openbmc#1626
Change-Id: Iaefa7b25c3f44691dd3ca4084bfddd3c1a504de9
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Speed increases are made providing a target speed delta. The increase is
made when the delta is higher than the current increase that may be
occurring. When no increase is currently happening, the increase delta
requested is accepted. All resulting target increases will not go above
a defined ceiling speed.
Change-Id: Ia19c71a023cf5b897d5ba92974ff98451f34d5a3
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
The net increase speed action provides the ability to determine what the
net delta the zone's fan speeds should be updated by from their current
target speed.
Change-Id: Ib463e5ed4836bebf906cea27ea5788d826ec9c38
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the default ceiling to be what's given as full speed and adjust the
ceiling speed based on an average of a given set of sensor values.
The ceiling is chosen from a given map's key transition values. The map
consists of key, value pairs where each key is the sensor value
transition point and the value is the ceiling speed for when that
transition occurs. The previous key value is needed to determine the
direction in which to chose the appropriate ceiling speed allowing a
buffer zone between ceiling changes if defined to.
Resolves openbmc/openbmc#1628
Change-Id: I7c9c553b5d0c3219c51b563aec7dd5d5f090916b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Implemented elog exception for phosphor fan presence,
replacing runtime_errors.
Change-Id: I70465060838b2cbaeadccf84ed5924e222ac59e3
Signed-off-by: Dinesh Chinari <chinari@us.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#940
Change-Id: I238cd4a6ef69c1d54a775ad90ee87e6e327b82bd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Given a group of sensor values, the average of those sensor values will
be used in selecting the floor speed for the zone. Each time the speed
is set/updated, any speed requested lower than the current floor will be
overwritten with the floor speed to not allow speeds below the floor.
Change-Id: I4c8e8a2cd66892b9fdc2bc5643e907adddff51f8
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
| |
Change-Id: Id2d3b362e79e7a8c2330181f68ae11e43f84e2fd
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Allow properties stored for processing events to be of types other than
bool
Change-Id: Ie1dde5aca562c9958bdff6fa3d1b19d3154b2c6d
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The interface is needed on the properties stored to uniquely identify
each property used in events.
Change-Id: Ia062f25514d7ed04ef1023a02eecad4738711ffb
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Only add events to the zone if the conditions and
zone number are correct.
Resolves openbmc/openbmc#1500
Change-Id: Ia040fcbdd9093d25d4ed1773d5fea0ed8a95ba2b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
| |
An example yaml file for zone conditions to be used to
create the correct fan zones.
Change-Id: I6ca339a3a9f37bc70424cde57f2229a5dcb70cbb
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|