aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-07-13 12:05:24 +0200
committerGitHub <noreply@github.com>2020-07-13 12:05:24 +0200
commit18a3244665eaec13a82964fca14ebec1f9e18caa (patch)
tree69d5e47331977bc4b5d7326ca6139bb0b60c594b /controller-server/src/main
parent97e12d9308e89a2a7dcfcc7fed2aa8d973976e21 (diff)
parent9f3a73ad7ae68d2f871cef34a280bc13ee0e72e9 (diff)
Merge pull request #13868 from vespa-engine/mpolden/todo
Default to deploying proxy application in zones with shared routing
Diffstat (limited to 'controller-server/src/main')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemUpgrader.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemUpgrader.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemUpgrader.java
index bf44c796f34..d9c78c8a442 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemUpgrader.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/SystemUpgrader.java
@@ -2,6 +2,7 @@
package com.yahoo.vespa.hosted.controller.maintenance;
import com.yahoo.component.Version;
+import com.yahoo.config.provision.zone.RoutingMethod;
import com.yahoo.config.provision.zone.ZoneApi;
import com.yahoo.vespa.hosted.controller.Controller;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.Node;
@@ -62,15 +63,12 @@ public class SystemUpgrader extends InfrastructureUpgrader<Version> {
if (application.hasApplicationPackage()) {
// For applications with package we do not have a zone-wide version target. This means that we must check
// the wanted version of each node.
+ boolean zoneHasSharedRouting = controller().zoneRegistry().routingMethods(zone.getId()).stream()
+ .anyMatch(RoutingMethod::isShared);
return minVersion(zone, application, Node::wantedVersion)
- // Upgrade if target is after any wanted version
- .map(target::isAfter)
- // Skip upgrade if there are no nodes allocated. This is overloaded to mean that the zone is not
- // expected to have a deployment of this application.
- // TODO(mpolden): Once all zones are either directly routed or not: Change this to
- // always deploy proxy app and wait for convergence in zones that are not directly
- // routed.
- .orElse(false);
+ .map(target::isAfter) // Upgrade if target is after any wanted version
+ .orElse(zoneHasSharedRouting); // Always upgrade if zone uses shared routing, but has no nodes allocated yet
+
}
return controller().serviceRegistry().configServer().nodeRepository()
.targetVersionsOf(zone.getId())