Restarts a set of nodes gracefully.