API: alloc stop doesn't stop per documentation

I am developing an internal mechanism to remotely stop allocs via the Nomad API. In my testing, I have noticed that using a POST on /v1/allocation/:alloc_id/stop does in deed stop the specific alloc, but it starts it on the same node (below screenshot shows this). Is the documentation incorrect (Commands: alloc stop | Nomad by HashiCorp → “…allows a user to perform an in-place restart…” The restart command says the same thing. The nomad GUI says this for the stop command → “This will reschedule the allocation on a different client.”) or is the API incorrect or is there something that I am missing? Thank you as always!

Hi @c.k. I believe both documentation items are incorrect for different reasons. The API does not allow for an in-place restart, it allows a user to stop an allocation which will then be replaced by a new allocation. The new allocation is computed by the servers and it can be placed on either the same, or a different node.

I will raise an issue against the Nomad repository to come up with a common sentence to describe this so we can update those two locations.

Thanks,
jrasell and the Nomad team

Thank you @jrasell for the quick reply. I appreciate your assistance!