private Result checkClusterStateAndRedundancy(Node node, int clusterStateVersion) {
        if (clusterInfo.getDistributorNodeInfos().isEmpty())
            return disallow("Not aware of any distributors, probably not safe to upgrade?");

        for (DistributorNodeInfo distributorNodeInfo : clusterInfo.getDistributorNodeInfos()) {
            Integer distributorClusterStateVersion = distributorNodeInfo.getHostInfo().getClusterStateVersionOrNull();
            if (distributorClusterStateVersion == null)
                return disallow("Distributor node " + distributorNodeInfo.getNodeIndex() +
                                " has not reported any cluster state version yet.");
            if (distributorClusterStateVersion != clusterStateVersion) {
                return disallow("Distributor node " + distributorNodeInfo.getNodeIndex() +
                                " does not report same version (" +
                                distributorNodeInfo.getHostInfo().getClusterStateVersionOrNull() +
                                ") as fleetcontroller (" + clusterStateVersion + ")");
            }

            Result storageNodesResult = checkRedundancy(distributorNodeInfo, node);
            if (storageNodesResult.notAllowed()) {
                return storageNodesResult;
            }
        }

        return allow();
    }
We want to check with the distributors to verify that it is safe to take down the storage node.
@param node the node to be checked
@param clusterStateVersion the cluster state we expect distributors to have
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java