private boolean acceptIncompatible(NodeCandidate candidate) {
        if (candidate.state() != Node.State.active) return false;
        if (candidate.allocation().get().membership().retired()) return true; // don't second-guess if already retired

        if ( ! requested.considerRetiring()) // the node is active and we are not allowed to remove gracefully, so keep
            return true;
        return cluster.isStateful() ||
               (cluster.type() == ClusterSpec.Type.container && !hasCompatibleResources(candidate));
    }
Returns whether this node should be accepted into the cluster even if it is not currently desired
(already enough nodes, or wrong resources, etc.).
Such nodes will be marked retired during finalization of the list of accepted nodes when allowed.
The conditions for this are:

- We are forced to accept since we cannot remove gracefully (bootstrap).

- This is a stateful node. These must always be retired before being removed to allow the cluster to
migrate away data.

- This is a container node and it is not desired due to having the wrong flavor. In this case this
will (normally) obtain for all the current nodes in the cluster and so retiring before removing must
be used to avoid removing all the current nodes at once, before the newly allocated replacements are
initialized. (In the other case, where a container node is not desired because we have enough nodes we
do want to remove it immediately to get immediate feedback on how the size reduction works out.)
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeAllocation.java