diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-02-20 08:12:52 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-02-20 08:12:52 +0100 |
commit | 8e4d898386d289a921d74db76f6dc4fdee4beebe (patch) | |
tree | 8d1aa12767c9616ccc6de1760c01018610bbe70e /orchestrator | |
parent | e6b11430bd4058493be2b230167ba1cfe8b17106 (diff) |
Use special orchestrator context for mass probe
Diffstat (limited to 'orchestrator')
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()); |