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

Add "distinctHost" constraint #321

Merged
merged 11 commits into from
Oct 26, 2015
Merged

Add "distinctHost" constraint #321

merged 11 commits into from
Oct 26, 2015

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Oct 22, 2015

This PR adds a distinctHost constraint that can be applied to either Task Groups or Jobs.

@@ -237,6 +237,14 @@ The `constraint` object supports the following keys:
the attribute. This sets the operator to "regexp" and the `value`
to the regular expression.

* `unique` - Unique accepts a boolean value and can be used to mark a Job or
a Task Group as requiring placement on unique nodes. If the `unique`
constraint is placed on a Job, all of it's Task Groups must be placed on
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's should not have an apostrophe

@dadgar dadgar changed the title Add "unique" constraint Add "distinctHost" constraint Oct 23, 2015
* `distinctHosts` - `distinctHosts` accepts a boolean `true`. The default is
`false`.

When `distinctHosts is `true` at the Job level, each instance of all Task
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing backtick on distinctHosts

@@ -256,6 +257,20 @@ func parseConstraints(result *[]*structs.Constraint, obj *hclobj.Object) error {
m["RTarget"] = constraint
}

if value, ok := m["distinctHosts"]; ok {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing in HCL uses camal case

@armon
Copy link
Member

armon commented Oct 26, 2015

LGTM other than changes

dadgar added a commit that referenced this pull request Oct 26, 2015
@dadgar dadgar merged commit 8fcefe0 into master Oct 26, 2015
@dadgar dadgar deleted the f-unique-constraint branch October 26, 2015 21:19
@LordFPL LordFPL mentioned this pull request Nov 6, 2015
benbuzbee pushed a commit to benbuzbee/nomad that referenced this pull request Jul 21, 2022
Add leveled logging
@github-actions
Copy link

github-actions bot commented May 7, 2023

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants