@Override
    public boolean maintenanceTransitionAllowed(int contentNodeIndex) {
        NodeState prevState = previouslyPublishedDerivedState.getNodeState(Node.ofStorage(contentNodeIndex));
        return prevState.getState().oneOf("dm");
    }
Simple implementation which considers a node eligible for being set to maintenance iff
it was down or in maintenance in the cluster state previously published. This avoids
taking down nodes with pending global merges if these have already passed through an
up-edge, but runs the risk of taking down a large set of nodes when the cluster
controller is restarted (due to not knowing the previously published state).

Output from this checker must always be combined with other constraints to decide whether
a node should be in maintenance; used alone it would most certainly cause havoc.

Considered sufficient for beta testing use cases.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/UpEdgeMaintenanceTransitionConstraint.java