From ce9694379a3d495b8e0719990050856642a212fe Mon Sep 17 00:00:00 2001 From: Carson Labrado Date: Mon, 11 Jul 2022 23:39:26 +0000 Subject: 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 Signed-off-by: Ed Tanous Change-Id: If1819389affc96f49908d586459b03b1bb2689c2 --- redfish-core/include/redfish_aggregator.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3