aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2021-09-23 17:17:27 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2021-09-23 17:17:27 +0200
commited96dd6b116f446f6a3242fa0a0ff71f6d8f9a9b (patch)
treedeb8771c67a652a868117c33009a49dab692b362 /orchestrator
parenta40c4cfaeba992413df69a5d1fa733483d569ef5 (diff)
Revert unintended change to verifyGroupGoingDownPermanentlyIsFine
Diffstat (limited to 'orchestrator')
-rw-r--r--orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java
index 8b8ab7986d8..fe06ef7d75b 100644
--- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java
+++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java
@@ -23,18 +23,15 @@ public class HostedVespaClusterPolicy implements ClusterPolicy {
@Override
public SuspensionReasons verifyGroupGoingDownIsFine(ClusterApi clusterApi) throws HostStateChangeDeniedException {
- return verifyGroupGoingDownIsFine(clusterApi, true);
+ return verifyGroupGoingDownIsFine(clusterApi, false);
}
@Override
public void verifyGroupGoingDownPermanentlyIsFine(ClusterApi clusterApi) throws HostStateChangeDeniedException {
- // This policy is similar to verifyGroupGoingDownIsFine, except that having no services up in the group will
- // not allow the suspension: We are a bit more cautious when removing nodes.
-
- verifyGroupGoingDownIsFine(clusterApi, false);
+ verifyGroupGoingDownIsFine(clusterApi, true);
}
- private SuspensionReasons verifyGroupGoingDownIsFine(ClusterApi clusterApi, boolean allowIfAllServicesAreDown)
+ private SuspensionReasons verifyGroupGoingDownIsFine(ClusterApi clusterApi, boolean permanent)
throws HostStateChangeDeniedException {
if (clusterApi.noServicesOutsideGroupIsDown()) {
return SuspensionReasons.nothingNoteworthy();
@@ -45,11 +42,14 @@ public class HostedVespaClusterPolicy implements ClusterPolicy {
return SuspensionReasons.nothingNoteworthy();
}
- // Disallow suspending a 2nd and downed config server to avoid losing ZK quorum.
- if (!clusterApi.isConfigServerLike()) {
- Optional<SuspensionReasons> suspensionReasons = clusterApi.allServicesDown();
- if (suspensionReasons.isPresent()) {
- return suspensionReasons.get();
+ // Be a bit more cautious when removing nodes permanently
+ if (!permanent) {
+ // Disallow suspending a 2nd and downed config server to avoid losing ZK quorum.
+ if (!clusterApi.isConfigServerLike()) {
+ Optional<SuspensionReasons> suspensionReasons = clusterApi.allServicesDown();
+ if (suspensionReasons.isPresent()) {
+ return suspensionReasons.get();
+ }
}
}