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
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index cb0ce39..24b42d9 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -134,7 +134,8 @@
{
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 @@
crow::HttpClient::getInstance().setRetryConfig(
retryAttempts, retryTimeoutInterval, aggregationRetryHandler,
retryPolicyName);
+ crow::HttpClient::getInstance().setRetryPolicy(retryPolicyAction,
+ retryPolicyName);
}
static inline boost::system::error_code