ResourceTagMaintainer handles ConnectTimeoutException
@@ -10,6 +10,7 @@ import com.yahoo.vespa.hosted.controller.Controller;
import com.yahoo.vespa.hosted.controller.api.integration.aws.ResourceTagger;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.Node;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.NodeFilter;
+import org.apache.hc.client5.http.ConnectTimeoutException;
import java.time.Duration;
import java.util.Map;
@@ -46,6 +47,7 @@ public class ResourceTagMaintainer extends ControllerMaintainer {
}
private Map<HostName, ApplicationId> getTenantOfParentHosts(ZoneId zoneId) {
+ try {
return controller().serviceRegistry().configServer().nodeRepository()
.list(zoneId, NodeFilter.all())
.stream()
@@ -55,6 +57,14 @@ public class ResourceTagMaintainer extends ControllerMaintainer {
this::getApplicationId,
(node1, node2) -> node1
));
+ } catch (Exception e) {
+ if (e.getCause() instanceof ConnectTimeoutException) {
+ // Usually transient - try again later
+ log.warning("Unable to retrieve hosts from " + zoneId.value());
+ return Map.of();
+ }
+ throw e;
+ }
}
private ApplicationId getApplicationId(Node node) {
