Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of scheduler: tolerate having only one dynamic port available into release/1.5.x #17623

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #17619 to be assessed for backporting due to the inclusion of the label backport/1.5.x.

The below text is copied from the body of the original PR.


If the dynamic port range for a node is set so that the min is equal to the max, there's only one port available and this passes config validation. But the scheduler panics when it tries to pick a random port. Only add the randomness when there's more than one to pick from.

Adds a test for the behavior but also adjusts the commentary on a couple of the existing tests that made it seem like this case was already covered if you didn't look too closely.

Fixes: #17585

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-scheduler-panic-1-dynamic-port/finally-usable-sturgeon branch from 17d6874 to 37153d8 Compare June 20, 2023 17:29
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 9e93ea7 into release/1.5.x Jun 20, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-scheduler-panic-1-dynamic-port/finally-usable-sturgeon branch from 2a98688 to a636c24 Compare June 20, 2023 17:29
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-scheduler-panic-1-dynamic-port/finally-usable-sturgeon branch June 20, 2023 17:29
@vercel vercel bot temporarily deployed to Preview – nomad June 20, 2023 17:33 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui June 20, 2023 17:39 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants