private Result otherNodeInGroupHasWantedState(Group group) {
        for (var configuredNode : group.getNodes()) {
            int index = configuredNode.index();
            StorageNodeInfo storageNodeInfo = clusterInfo.getStorageNodeInfo(index);
            if (storageNodeInfo == null) continue;  // needed for tests only
            State storageNodeWantedState = storageNodeInfo.getUserWantedState().getState();
            if (storageNodeWantedState != UP)
                return disallow("At most one group can have wanted state: Other storage node " + index +
                                " in group " + group.getIndex() + " has wanted state " + storageNodeWantedState);

            State distributorWantedState = clusterInfo.getDistributorNodeInfo(index).getUserWantedState().getState();
            if (distributorWantedState != UP)
                return disallow("At most one group can have wanted state: Other distributor " + index +
                                " in group " + group.getIndex() + " has wanted state " + distributorWantedState);
        }

        return allow();
    }
Returns a disallow-result, if there is a node in the group with wanted state != UP.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/NodeStateChangeChecker.java