d06905c9 | 12-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:SIGHUP: Handle reloading JSON config thru SIGHUP
Enable capturing the HUP signal to reload the JSON configuration. This will reload the appropriate JSON configuration file found and update t
monitor:SIGHUP: Handle reloading JSON config thru SIGHUP
Enable capturing the HUP signal to reload the JSON configuration. This will reload the appropriate JSON configuration file found and update the trust groups and fan definitions configured.
Tested: JSON configuration is reloaded and updated after SIGHUP Single instance of trust groups exist that match the JSON config Single instance of fan definitions exist that match the JSON config
Change-Id: If55ca583a67fd76f0733009707bd5c4b5eda3e63 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
c95c527a | 15-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:SIGHUP: Create and use system object
Use a system object to handle retrieving the trust groups and fan definitions configured. This is necessary for handling HUP signals in the future where
monitor:SIGHUP: Create and use system object
Use a system object to handle retrieving the trust groups and fan definitions configured. This is necessary for handling HUP signals in the future where a reload of the JSON configuration is done.
Tested: No change in the loading of the trust groups configuration No change in the loading of the fan definitions configured
Change-Id: I5df2d54641f80778bbf09d7b1f4588a458e11c71 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
bedefd80 | 02-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Enable JSON configuration file usage
Add the support to enable the use of a JSON configuration file at configure time using the same `enable_json` flag along with the appropriate makef
monitor:JSON: Enable JSON configuration file usage
Add the support to enable the use of a JSON configuration file at configure time using the same `enable_json` flag along with the appropriate makefile attributes to compile in the JSON configuration file support.
Tested: `--enable-json` configure flag enables use of JSON in place of YAML YAML build time configuration used when `--enable-json` not given JSON configuration file loaded/parsed/used when enabled
Change-Id: Ie869b245df533d2a3656543f8ce370d9d24cf4ce Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
3ad14346 | 08-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Parse fan monitoring conditions
Optional conditions can be used to include monitoring a fan or not based on the results of the condition function configured. These condition functions
monitor:JSON: Parse fan monitoring conditions
Optional conditions can be used to include monitoring a fan or not based on the results of the condition function configured. These condition functions have their own required set of parameters, so parsing the JSON for these conditions are done per supported condition function. This adds the JSON parsing support for the current condition functions.
Tested: `propertiesMatch` JSON parameters parsed into condition function Any required parameters missing throws an exception The `propertiesMatch` condition functions the same using JSON
Change-Id: I0f843951f4e83f2a5d44068820694010538788c1 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
b80e9380 | 11-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Add JSON variant type handler
Runtime determination of a configured JSON entry's data type that's parsed into a variant needs a special handler for each type that the variant could con
monitor:JSON: Add JSON variant type handler
Runtime determination of a configured JSON entry's data type that's parsed into a variant needs a special handler for each type that the variant could contain. This uses the JSON entry's determined type unless an optional type is given to parse it as that data type, which must be supported in the variant the JSON entry's value is stored in.
Tested: Exception thrown when an unsupported type is configured Supported types are parsed and returned within the variant No configured type given results in returning JSON determined type
Change-Id: I3e5be5b369eb53fec2025ec19f235df927fbb3d8 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
22ab93b4 | 08-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Parse fan definitions
Parse and create the list of fan definitions for monitoring from a JSON configuration file.
Tested: Fan definition list created same as from YAML Any req
monitor:JSON: Parse fan definitions
Parse and create the list of fan definitions for monitoring from a JSON configuration file.
Tested: Fan definition list created same as from YAML Any required parameters missing cause a runtime exception
Change-Id: Iafa194f01a48ed3445c5da6187db62cb4d2672d7 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
9ea8bee7 | 04-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Parse trust groups
Parse and create the list of trust groups functions from a JSON configuration file.
Tested: Existing trust groups functions parsed and function correctly An
monitor:JSON: Parse trust groups
Parse and create the list of trust groups functions from a JSON configuration file.
Tested: Existing trust groups functions parsed and function correctly Any required parameters missing cause a runtime exception
Change-Id: I4d24b97c966c97f3ff253d8c96cb0724eff1a8af Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
ccaf2db9 | 04-Jun-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor:JSON: Find and load JSON configuration
Using the JSON config utility to find and load the appropriate JSON configuration file, the JSON parsed object is returned. This object will be what's
monitor:JSON: Find and load JSON configuration
Using the JSON config utility to find and load the appropriate JSON configuration file, the JSON parsed object is returned. This object will be what's used to parse each section of fan monitor's configuration.
Tested: JSON configuration file found and loaded at each possible location
Change-Id: I718ad3daa240d654ecee3733ebca2d7743ba9d17 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
177fe986 | 26-May-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang format.
Tested: Compiled
Change-Id: Ieead1449cfd4b61333a135740dce03789218f92b Signed-off-by: Ma
monitor: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang format.
Tested: Compiled
Change-Id: Ieead1449cfd4b61333a135740dce03789218f92b Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
5e7298c5 | 20-May-2020 |
Matthew Barth <msbarth@us.ibm.com> |
monitor: Change factor from size_t to double
To support a broader range of possible factors users could apply, change the optional factor from a size_t to double type. This allows a configuration to
monitor: Change factor from size_t to double
To support a broader range of possible factors users could apply, change the optional factor from a size_t to double type. This allows a configuration to use a decimal factor value.
Tested: N/A
Change-Id: Id0540872df41946b8b75b1b75a4ee130a9ed0876 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
c21d0b36 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: replace message::variant with std::variant
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7b2bc0a8b34e4d276c0e8ea2243459aab4e1c177 |
1f514fa8 | 13-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: remove deprecated variant_ns
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: If06a676c19b2005c388a6ac48ba2d9f13e7615b2 |
f24d7749 | 17-Mar-2020 |
Matthew Barth <msbarth@us.ibm.com> |
Switch to use of python3
Update each fan application that uses a python script to parse/generate their respective configuration to use python3.
*Decoupling the fan presence application from using s
Switch to use of python3
Update each fan application that uses a python script to parse/generate their respective configuration to use python3.
*Decoupling the fan presence application from using sdbusplus python libraries is outside the scope of this change and could be rebased before this if necessary.
Change-Id: Ic2fda095daf0331d08146f0020b4ff0a88995bb3 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
8c8f53dd | 18-Feb-2020 |
Matthew Barth <msbarth@us.ibm.com> |
Output generated source to builddir
Fix fan monitor and fan control generated source output to be put in the designated build directory. This corrects the issue where the files are not regenerated a
Output generated source to builddir
Fix fan monitor and fan control generated source output to be put in the designated build directory. This corrects the issue where the files are not regenerated after another compile is instantiated.
Tested: Files regenerated after `bitbake -c compile phosphor-fan`
Change-Id: I4a07920196cf525e41da316f790e0c19508ea4e9 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
4eac3cf9 | 21-Jun-2019 |
Lei YU <mine260309@gmail.com> |
monitor: use signed value for factor and offset
The code was using size_t for factor and offset. For some fans the offset could be negative, so it needs to use signed types. This commit changes the
monitor: use signed value for factor and offset
The code was using size_t for factor and offset. For some fans the offset could be negative, so it needs to use signed types. This commit changes the offset type to int64_t.
Signed-off-by: Lei YU <mine260309@gmail.com> Change-Id: I7443b00cd9f55ff0acb2fcc077bf2f5ba2b74395
show more ...
|
71779ab4 | 28-Mar-2019 |
Patrick Venture <venture@google.com> |
build: install into bin instead of sbin
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I452171c4661228d903fe0570342be630cb0dbbd9 |
dea024f0 | 29-Oct-2018 |
William A. Kennington III <wak@google.com> |
libfan: Remove
Since the removal of the custom timer implementation our libfan has nothing but a single header file. Since we have no object code left we do not need a library to contain this code s
libfan: Remove
Since the removal of the custom timer implementation our libfan has nothing but a single header file. Since we have no object code left we do not need a library to contain this code since the header is directly included where needed.
Tested: Built and run through unit tests.
Change-Id: I139b83ab979ead88cfd4c180ba8847a29c6407e2 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
8fd879fb | 30-Oct-2018 |
William A. Kennington III <wak@google.com> |
Remove timer in favor of sdeventplus/utility/timer
This removes the custom timer implementation and moves to the sdeventplus utility. Functionally this should make no change
Tested: Built and r
Remove timer in favor of sdeventplus/utility/timer
This removes the custom timer implementation and moves to the sdeventplus utility. Functionally this should make no change
Tested: Built and run through the unit test suite.
Change-Id: Ib7ee90d489d5db72496aaaca91c3cf5490ad47d6 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
22c36ab6 | 30-Oct-2018 |
William A. Kennington III <wak@google.com> |
Prefer bind over method call in lambda
This reduces a layer of indirection since the function can be called directly instead of indirectly accessing it with the lambda. It also makes the instantiati
Prefer bind over method call in lambda
This reduces a layer of indirection since the function can be called directly instead of indirectly accessing it with the lambda. It also makes the instantiation more flexible since it can match callbacks with extra arguments.
Tested: Built and run through unit tests.
Change-Id: I5317203fa70c027c5e774ed6192952058e35bd81 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
1cfc2f11 | 19-Oct-2018 |
William A. Kennington III <wak@google.com> |
Switch sd_event loops to sdeventplus
This change is mostly focused around plumbing the sdeventplus::Event object everywhere and using the member functions provided for the event. No migration to the
Switch sd_event loops to sdeventplus
This change is mostly focused around plumbing the sdeventplus::Event object everywhere and using the member functions provided for the event. No migration to the timer utility is performed yet.
Change-Id: I912ab82bc081239d3b7c3cf7c5caca6742ef9c87 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
3e781064 | 19-Oct-2018 |
William A. Kennington III <wak@google.com> |
Fix exit status codes
Using an exit status of -1 everywhere leads to the status being converted to 255 when output to a calling application. While this does signify an error it has a reserved meanin
Fix exit status codes
Using an exit status of -1 everywhere leads to the status being converted to 255 when output to a calling application. While this does signify an error it has a reserved meaning for exit status out of range. Lets use a valid general exit status of 1 instead.
Change-Id: I326701c78985e34c430c258fe31d9e910da10405 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
ecd4bc7b | 27-Aug-2018 |
Andrew Geissler <geissonator@yahoo.com> |
Add -flto to CXXFLAGS
Per openbmc/openbmc#3364, adding -flto to CXX flags in order to reduce overall library and binary sizes.
Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization
Change-Id: I3ee31a
Add -flto to CXXFLAGS
Per openbmc/openbmc#3364, adding -flto to CXX flags in order to reduce overall library and binary sizes.
Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization
Change-Id: I3ee31a15fc0ded4308aa9d00a11b41bc62eb9799 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
ba7b5fea | 25-Apr-2018 |
Matt Spinler <spinler@us.ibm.com> |
Throw custom exceptions on D-Bus method failures
All 3 fan applications - control, monitor, and presence have cases where it is expected that a getProperty call may fail because a sensor is missing.
Throw custom exceptions on D-Bus method failures
All 3 fan applications - control, monitor, and presence have cases where it is expected that a getProperty call may fail because a sensor is missing. While the applications already handle this, the InternalFailure exception that was being thrown by the underlying call generates log entries that make it look like something bad happened.
The custom exceptions now being thrown do not log anything on creation, but store all of the failing information so that any callers could still log the info if they wanted to.
Tested: Boot a water cooled Witherspoon and see the fan presence and monitor applications not look like they are failing. Boot a system without the fan hwmon running, and see fan-control-init still show the fails.
Change-Id: Ifd8ad6e3deb492bbaf33f12c7258125dce1e5ea8 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
33618bc1 | 03-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Add generation of propertiesMatch condition
Update the mako template to generate conditions within the FanDefinition sections when a condition is defined for a fan. Each supported condition function
Add generation of propertiesMatch condition
Update the mako template to generate conditions within the FanDefinition sections when a condition is defined for a fan. Each supported condition function's parameters are generated within a `getCondParams` mako method, allowing easy support of additional conditions with differing parameters.
Tested: A given condition's function and parameters generate correctly No condition function is generated on a fan where not defined
Resolves: openbmc/openbmc#2976
Change-Id: I3f0b30702fdcef6749929d85543270863eb26381 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|
81748b14 | 02-May-2018 |
Matthew Barth <msbarth@us.ibm.com> |
Support optional conditions on creating fans
This adds the functional infrastructure to optionally attach a condition function to a fan definition. When a condition is defined on a fan, it must be t
Support optional conditions on creating fans
This adds the functional infrastructure to optionally attach a condition function to a fan definition. When a condition is defined on a fan, it must be true for a fan's associated functional properties to be created. When the given condition fails, that fan's functional properties will not be created by fan monitor. A fan without a defined condition will have all of its associated functional properties created.
Example of generated condition (generation commit to follow):
make_condition(condition::propertiesMatch( std::vector<PropertyState>{ PropertyState{ PropertyIdentity{ "/xyz/openbmc_project/inventory/system/chassis", "xyz.openbmc_project.Inventory.Decorator.CoolingType", "WaterCooled" }, static_cast<bool>(false) } } )),
Tested: Fan functional properties are not created when a condition fails Fan functional properties are created when condition passes Fan functional properties are created when no condition exists
Change-Id: I9ced2e520d2f97e6655c9417970b3e976d78fef4 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
show more ...
|