Do not check config convergence for all applications in VersionStatus unless it has eligible for upgrade nodes
@@ -6,12 +6,12 @@ import com.yahoo.collections.ListMap;
import com.yahoo.component.Version;
import com.yahoo.component.Vtag;
import com.yahoo.config.provision.HostName;
+import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.log.LogLevel;
import com.yahoo.vespa.hosted.controller.Application;
import com.yahoo.vespa.hosted.controller.Controller;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.Node;
import com.yahoo.vespa.hosted.controller.api.integration.github.GitSha;
-import com.yahoo.config.provision.zone.ZoneId;
import com.yahoo.vespa.hosted.controller.application.ApplicationList;
import com.yahoo.vespa.hosted.controller.application.Deployment;
import com.yahoo.vespa.hosted.controller.application.JobList;
@@ -157,13 +157,18 @@ public class VersionStatus {
ListMap<Version, HostName> versions = new ListMap<>();
for (ZoneId zone : zones) {
for (SystemApplication application : SystemApplication.all()) {
+ List<Node> eligibleForUpgradeApplicationNodes = controller.configServer().nodeRepository()
+ .list(zone, application.id()).stream()
+ .filter(SystemUpgrader::eligibleForUpgrade)
+ .collect(Collectors.toList());
+ if (eligibleForUpgradeApplicationNodes.isEmpty())
+ continue;
+
boolean configConverged = application.configConvergedIn(zone, controller, Optional.empty());
if (!configConverged) {
log.log(LogLevel.WARNING, "Config for " + application.id() + " in " + zone + " has not converged");
}
- for (Node node : controller.configServer().nodeRepository().list(zone, application.id()).stream()
- .filter(SystemUpgrader::eligibleForUpgrade)
- .collect(Collectors.toList())) {
+ for (Node node : eligibleForUpgradeApplicationNodes) {
// Only use current node version if config has converged
Version nodeVersion = configConverged ? node.currentVersion() : controller.systemVersion();
versions.put(nodeVersion, node.hostname());
