private void restartServicesIfNeeded(ApplicationId applicationId) {
        if (provisioner.isEmpty()) return;

        Set<String> nodesToRestart = session.getActivationTriggers().nodeRestarts().stream().map(NodeRestart::hostname).collect(toSet());
        if (nodesToRestart.isEmpty()) return;

        applicationRepository.modifyPendingRestarts(applicationId, pendingRestarts -> pendingRestarts.withRestarts(session.getSessionId(), nodesToRestart));
        deployLogger.log(Level.INFO, String.format("Scheduled service restart of %d nodes: %s",
                                                   nodesToRestart.size(), nodesToRestart.stream().sorted().collect(joining(", "))));
        log.info(String.format("%sWill schedule service restart of %d nodes after convergence on generation %d: %s",
                               session.logPre(), nodesToRestart.size(), session.getSessionId(), nodesToRestart.stream().sorted().collect(joining(", "))));
        configChangeActions = configChangeActions == null ? null : configChangeActions.withRestartActions(new RestartActions());
    }
Activates this. If it is not already prepared, this will call prepare first.
configserver/src/main/java/com/yahoo/vespa/config/server/deploy/Deployment.java