summaryrefslogtreecommitdiffstats
path: root/orchestrator
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2021-02-20 08:12:52 +0100
committerJon Marius Venstad <venstad@gmail.com>2021-02-20 08:12:52 +0100
commit8e4d898386d289a921d74db76f6dc4fdee4beebe (patch)
tree8d1aa12767c9616ccc6de1760c01018610bbe70e /orchestrator
parente6b11430bd4058493be2b230167ba1cfe8b17106 (diff)
Use special orchestrator context for mass probe
Diffstat (limited to 'orchestrator')
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/Orchestrator.java3
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorContext.java5
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorImpl.java3
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());