private Stream<ConfiguredNode> candidateNodesForSettingMaintenance(Group g) {
            // Most states should be set in maintenance, e.g. retirement may take a long time,
            // so force maintenance to allow upgrades.
            return g.getNodes().stream()
                    // "m" is NOT included since that would be a no-op.
                    .filter(n -> nodeIsAvailableInState(n.index(), "uird"));
        }
If the number of nodes safely set to maintenance is at least this number, the remaining
nodes in the group will be set to maintenance (storage nodes) or down (distributors).

<p>This feature is disabled if safeMaintenanceGroupThreshold is 0 (not default).</p>
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/GroupAvailabilityCalculator.java