diff options
author | Håkon Hallingstad <hakon@yahooinc.com> | 2023-05-22 15:20:06 +0200 |
---|---|---|
committer | Håkon Hallingstad <hakon@yahooinc.com> | 2023-05-22 15:20:06 +0200 |
commit | 8e27d11981fad3bda4bd510dfcd3ef6eeec1fba1 (patch) | |
tree | 871e14b76b43b7dbce1606c733d86147046a0968 /orchestrator | |
parent | 77899fda9ea5cc8a3f08d3c61d5ce2047205b123 (diff) |
Allow cfgs with ALLOW_TO_BE_DOWN to go down
Diffstat (limited to 'orchestrator')
-rw-r--r-- | orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ClusterApiImpl.java | 3 | ||||
-rw-r--r-- | orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/HostedVespaClusterPolicy.java | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ClusterApiImpl.java b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ClusterApiImpl.java index 1fb1ad4b2ff..024a3bc58db 100644 --- a/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ClusterApiImpl.java +++ b/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/model/ClusterApiImpl.java @@ -136,7 +136,8 @@ class ClusterApiImpl implements ClusterApi { continue; } - if (service.serviceStatus() == ServiceStatus.DOWN) { + // Disallow suspending a 2nd and downed config server to avoid losing ZK quorum. + if (service.serviceStatus() == ServiceStatus.DOWN && !isConfigServerLike()) { Optional<Instant> since = service.serviceStatusInfo().since(); if (since.isEmpty()) { reasons.mergeWith(SuspensionReasons.isDown(service)); 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 8193974c35a..5d553c86c50 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 @@ -44,12 +44,9 @@ public class HostedVespaClusterPolicy implements ClusterPolicy { // 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(); - } + Optional<SuspensionReasons> suspensionReasons = clusterApi.allServicesDown(); + if (suspensionReasons.isPresent()) { + return suspensionReasons.get(); } } |