Skip to content

Commit

Permalink
Merge pull request #4425 from hashicorp/d-warn-impossible-constraint
Browse files Browse the repository at this point in the history
Added warning about impossible constraints
  • Loading branch information
angrycub authored Jun 19, 2018
2 parents 4ccbf32 + a9d96a7 commit 362546e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions website/source/docs/job-specification/constraint.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ filter on [attributes][interpolation] or [client metadata][client-meta].
Additionally constraints may be specified at the [job][job], [group][group], or
[task][task] levels for ultimate flexibility.

~> **It is possible to define irreconcilable constraints in a job.**
For example, because all [tasks within a group are scheduled on the same client node][group],
specifying different [`${attr.unique.hostname}`][node-variables] constraints at
the task level will cause a job to be unplaceable.

```hcl
job "docs" {
# All tasks in this job must run on linux.
Expand Down Expand Up @@ -273,3 +278,4 @@ constraint {
[client-meta]: /docs/agent/configuration/client.html#meta "Nomad meta Job Specification"
[task]: /docs/job-specification/task.html "Nomad task Job Specification"
[interpolation]: /docs/runtime/interpolation.html "Nomad interpolation"
[node-variables]: /docs/runtime/interpolation.html#node-variables- "Nomad interpolation-Node variables"

0 comments on commit 362546e

Please sign in to comment.