aboutsummaryrefslogtreecommitdiffstats
path: root/orchestrator/src/main/java/com/yahoo/vespa/orchestrator/policy/ClusterPolicy.java
blob: e0c0758ee2cb95d82f0fb39145c22ba478cdd401 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.orchestrator.policy;

import com.yahoo.vespa.orchestrator.model.ClusterApi;

public interface ClusterPolicy {
    /**
     * There's an implicit group of nodes known to clusterApi.  This method answers whether
     * it would be fine, just looking at this cluster (and disregarding Cluster Controller/storage
     * which is handled separately), to allow all services on all the nodes in the group to go down.
     *
     * @return notable reasons for why this group is fine with going down.
     */
    SuspensionReasons verifyGroupGoingDownIsFine(ClusterApi clusterApi) throws HostStateChangeDeniedException;

    /**
     * There's an implicit group of nodes known to clusterApi.  This method answers whether
     * it would be fine, just looking at this cluster, to allow all services on all the nodes
     * in the group to go down PERMANENTLY (removed from application).
     */
    void verifyGroupGoingDownPermanentlyIsFine(ClusterApi clusterApi) throws HostStateChangeDeniedException;
}