How to relocate (or evict) allocations with sticky ephemeral disks?

Hello there!

I’m running a few jobs that greatly benefit from sticking to the same nodes and reusing volumes that are already present on the node across restarts and updates. That is working fine with ephemeral_disks { sticky = true }. When we update the job the allocations are placed on the same nodes as they were before, so all fine there.

The challenge we have is that every now and then we need to move one of these allocations to another eligible node and the only way we found so far is to drain the node to force the task to be rescheduled somewhere else, and then remove the drain.

Draining is not a great solution though, because it causes all other allocations running on the node to be rescheduled as well.

Is there any way in which we could relocate or somehow evict one particular allocation from one node?

Using nomad 1.0.4 here. Thanks!

Hi @ivantopo,

There are ways to stop or signal individual allocations, although this doesn’t mean the replacement allocation won’t be scheduled on the same node. The ability to drain/evict individual allocation does not exist within Nomad, however, I think it could be worthwhile raising a feature request against the Nomad repository with details regarding your use case so the wider team and community can see and add comments.

Thanks,
jrasell and the Nomad team