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] Honor false for distinct hosts constraint into release/1.4.x #16915

Conversation

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

Backport

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

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


Currently, when checking a nodes feasibility against the distinct_hosts constraint, the mere presence of the constraint is sufficient to activate it; however, the documentation indicates that setting the value to false is a legitimate answer.

The jobspec HCL1 parser would look for cases where the value was set to false and strip it from the generated job specification before submission. The jobspec2 HCL2 parser writes it into the specification with the provided value whether true or false.

This has the consequence of causing jobs or tasks with a distinct_hosts constraint to always act as though the value is set to true.

Fixes #13861

  • Honor value for distinct_hosts constraint
  • Add test for feasibility checking for false

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-fix-13861/entirely-content-lioness branch 2 times, most recently from d1cc6ee to 3fb32f2 Compare April 17, 2023 21:46
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit 656aa0c into release/1.4.x Apr 17, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-fix-13861/entirely-content-lioness branch April 17, 2023 21:46
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.

2 participants