scheduler: skip setting preferred node when nodepool changes#26662
scheduler: skip setting preferred node when nodepool changes#26662mismithhisler merged 8 commits intomainfrom
Conversation
Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
jrasell
left a comment
There was a problem hiding this comment.
The change looks good to me, but seeing as @pkazmierczak has been deep in this code, I'd like for him to take a quick look.
It would be nice if we could tighten the use of must for the added test cases; such as:
if err := h.Process(NewServiceScheduler, eval); err != nil {
t.Fatalf("err: %v", err)
}
must.NoError(t, h.Process(NewServiceScheduler, eval))
PR also needs a changelog entry.
pkazmierczak
left a comment
There was a problem hiding this comment.
Great work, @mismithhisler, LGTM. As noted by James, a small refactoring of the tests would be nice and a changelog entry.
|
I'm now realizing this bug probably happens with datacenters too (if they're not overlapping sets between versions), because we use both pool and DC to get the set of eligible nodes. |
Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
…nges (#26662) Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
…nges (#26662) (#26916) Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Description
Preferred node is used when a task group has an ephemeral disk, so we ideally stay on the same node. However if the jobs node pool changes, we should not select the current node as the preferred node, and let the scheduler decide which node to pick from the correct node pool.
Testing & Reproduction steps
Links
Fixes GH #26600
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad website documentation to reflect this. Refer to
the website README for docs guidelines. Please also consider whether the
change requires notes within the upgrade guide.
Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.