Change retry policy for redfish aggregator
Redfish aggregator should be a forwarding proxy, and return errors to
the user on failure. That max retry parameter was set to one,
presumably to fulfill that purpose. A max "retry" of one means that the
aggregator will attempt twice to get a response, which can interact
poorly with long timeouts, and end up not returning an error to the
calling user. Change the code to implement a single attempt.
Tested:
Basic aggregation paths work over HTTP between two qemu instances; Top
level collections show aggregated resources.
Change-Id: I48d6b1195f94bed09de0e05ad3469c30b3973019
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 649ddb4..5ccfd2f 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -371,7 +371,7 @@
inline crow::ConnectionPolicy getAggregationPolicy()
{
- return {.maxRetryAttempts = 1,
+ return {.maxRetryAttempts = 0,
.requestByteLimit = aggregatorReadBodyLimit,
.maxConnections = 20,
.retryPolicyAction = "TerminateAfterRetries",