commit | cd5b0b7e8e1a473262e4753e46e62d416a65649d | [log] [tgz] |
---|---|---|
author | Ankita Vilas Gawade <ankita.gawade@intel.com> | Thu Jan 20 20:55:04 2022 +0000 |
committer | Krzysztof Grobelny <krzysztof.grobelny@intel.com> | Wed Feb 02 12:17:28 2022 +0000 |
tree | d900185adfb475e71b1a7d38da62c2836dcd276c | |
parent | a950e42ba579a3498face1654e58c94d9ff1cf9a [diff] |
Add limit to Metric URIs to avoid buffer overflow This commit Limits the Number of Metrics to 150 URIs to avoid overpopulating the Event to be Sent. This is Necessary to avoid Buffer Overflow During Creation of Periodic MetricReport (RedfishEvent) via Event Service Subscription. This Buffer overflow occurs as the max size of buffer used to send Events is limited to 1024*64 This commit also removes max-reading-parameter as max-number-metrics indirectly places constraint over number of reading parameters (which makes them mutually exclusive).The parameter max-number-metrics provides a better control over size of the metrics compared to max-reading-parameter as it restricts the number of overall uris instead of number of metrics. Additional limit for appendLimit was added to ensure we can store all metric values in persistent memory. Tested: - Created Metric Report Defination by POST to /redfish/v1/TelemetryService/MetricReportDefinitions/ with <150, =150 and >150 Metric Uris Successfully returned error for metric uris>150. - Observed no buffer overflow for Maximum of 150 Metric Uris. - Verified buffer Overflow by Subscribing to Metric Reports using SSE. - Test case Passed [ RUN ] TestReportManager.failToAddReportWith MoreSensorParametersThanExpected [ OK ] TestReportManager.failToAddReportWith MoreSensorParametersThanExpected (10 ms) [ RUN ] TestReportManager.failToAddReportWith MoreMetricsThanExpected [ OK ] TestReportManager.failToAddReportWith MoreMetricsThanExpected (20 ms) [ RUN ] TestReportManager.failToAddReportWith AppendLimitGreaterThanMax [ OK ] TestReportManager.failToAddReportWith AppendLimitGreaterThanMax (20 ms) Signed-off-by: Ankita Vilas Gawade <ankita.gawade@intel.com> Change-Id: I113c15c7b1054364d827f39582c7d3fbe9495d12
This component implements middleware for sensors and metrics aggregation.
This application is implementation of Telemetry proposed in OpenBMC design docs [1]
.
It's responsible for:
[2]
,[3]
updates.[4]
There are two way to build telemetry service:
To build it using bitbake follow the guide from OpenBMC docs[5]
. To build it using meson follow the quick guide to install meson[6]
and then run below commands
meson build cd build ninja
After successful build you should be able to run telemetry binary or start unit tests
./tests/telemetry-ut ./telemetry
In case if system is missing boost dependency, it is possible to build it locally and set BOOST_ROOT environment variable to location of built files for meson. After this change meson should be able to detect boost dependency. See [7]
for more details.
More information can be found in OpenBMC docs repository [8]
.