@Override
    protected double maintain() {
        int attempts = 0;
        int successes = 0;
        List<ApplicationId> applicationsWithRetiredNodes = nodeRepository().nodes().list(Node.State.active)
                                                                           .retired()
                                                                           .stream()
                                                                           .map(node -> node.allocation().get().owner())
                                                                           .distinct()
                                                                           .toList();
        for (var application : applicationsWithRetiredNodes) {
            attempts++;
            if (removeRetiredNodes(application)) {
                successes++;
            }
        }
        return attempts == 0 ? 1.0 : ((double)successes / attempts);
    }
Maintenance job which deactivates retired nodes, if given permission by orchestrator, or
after the system has been given sufficient time to migrate data to other nodes.

@author hakon
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/RetiredExpirer.java