Nomad: spread not respected during node drain

Created on 1 Apr 2020  路  4Comments  路  Source: hashicorp/nomad

It would be convenient if migrations (e.g., triggered by nomad node drain and governed by the migrate stanza) were able to spread new allocations.

This feature will be useful for us, since it will keep the spread configuration constraints even after draining nodes.

themdrain themscheduling typbug

Most helpful comment

Hey @soreko sorry I didn't follow up on your first reply. Yeah, that definitely seems like a bug and I'll get it into our planning to fix.

All 4 comments

Hi @soreko! Could you maybe walk me through that scenario in a little more detail? I want to make sure I understand what the request is.

Hey @tgross, thanks for replying.

I have 100 allocations, with spread stanza:

spread {
    attribute = "${node.unique.id}"
}

So for 10 nodes, I get 10 allocs per node.
When I'm migrating a node with nomad node drain -enable -self, I'm expecting those node's 10 allocs to be spread according to my spread stanza (10 allocs on the other 9 nodes -> ~1 alloc per node), but I'm resulting with bin-packing

Hey @tgross, I think this is a bug, since spread is not enforced when a drain occurs

Hey @soreko sorry I didn't follow up on your first reply. Yeah, that definitely seems like a bug and I'll get it into our planning to fix.

Was this page helpful?
0 / 5 - 0 ratings