diff options
3 files changed, 9 insertions, 2 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/Orchestrator.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/Orchestrator.java index baea38ed4d8..20a30d45fe5 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/Orchestrator.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/Orchestrator.java @@ -127,6 +127,9 @@ public interface Orchestrator { */ void suspend(ApplicationId appId) throws ApplicationStateChangeDeniedException, ApplicationIdNotFoundException; + /** + * Whether each content cluster is currently allowed to go down. This indicates the deployment is "in sync". + */ default boolean isQuiescent(ApplicationId id) { return false; } } diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java index d69cbcf7e9f..468a4aa94ab 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java @@ -55,6 +55,11 @@ public class OrchestratorContext implements AutoCloseable { false, false); } + public static OrchestratorContext createContextForBatchProbe(Clock clock) { + return new OrchestratorContext(null, clock, TimeBudget.fromNow(clock, DEFAULT_TIMEOUT_FOR_BATCH_OP), + true, false); + } + private OrchestratorContext(OrchestratorContext parentOrNull, Clock clock, TimeBudget timeBudget, diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java index eba7df8c6ac..a901ecf4e76 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java @@ -398,8 +398,7 @@ public class OrchestratorImpl implements Orchestrator { .collect(toList()); // For all content clusters, probe whether maintenance is OK. - OrchestratorContext context = OrchestratorContext.createContextForSingleAppOp(clock) - .createSubcontextForSingleAppOp(true); // probe + OrchestratorContext context = OrchestratorContext.createContextForBatchProbe(clock); for (ServiceCluster cluster : contentClusters) { List<HostName> clusterControllers = VespaModelUtil.getClusterControllerInstancesInOrder(application, cluster.clusterId()); ClusterControllerClient client = clusterControllerClientFactory.createClient(clusterControllers, cluster.clusterId().s()); |