summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Labrado <clabrado@google.com>2022-07-12 02:39:26 +0300
committerEd Tanous <edtanous@google.com>2022-08-24 00:47:32 +0300
commitce9694379a3d495b8e0719990050856642a212fe (patch)
tree1fbb86b955484b815e9fe75c63efc92025ba11cb
parent4c30e226d2a82c14bdcb4928487f5b6d3fb721f9 (diff)
downloadbmcweb-ce9694379a3d495b8e0719990050856642a212fe.tar.xz
Aggregation: Reduce Retry Policy
Reduces the number of retry attempts to 1. The aggregating BMC cannot generate a response until the retry policy has been exhausted. We want to minimize the amount of time it takes for the aggregating BMC to respond in the event of an unreachable satellite BMC. Also explicity sets Redfish Aggregation's retry policy action as "TerminateAfterRetries". Previously it relied on this being the default action. Tested: Requests sent to unreachable satellite BMC only attempted to resend a single time. Signed-off-by: Carson Labrado <clabrado@google.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: If1819389affc96f49908d586459b03b1bb2689c2
-rw-r--r--redfish-core/include/redfish_aggregator.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index cb0ce39fc4..24b42d95e4 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -134,7 +134,8 @@ class RedfishAggregator
{
private:
const std::string retryPolicyName = "RedfishAggregation";
- const uint32_t retryAttempts = 5;
+ const std::string retryPolicyAction = "TerminateAfterRetries";
+ const uint32_t retryAttempts = 1;
const uint32_t retryTimeoutInterval = 0;
const std::string id = "Aggregator";
@@ -146,6 +147,8 @@ class RedfishAggregator
crow::HttpClient::getInstance().setRetryConfig(
retryAttempts, retryTimeoutInterval, aggregationRetryHandler,
retryPolicyName);
+ crow::HttpClient::getInstance().setRetryPolicy(retryPolicyAction,
+ retryPolicyName);
}
static inline boost::system::error_code