Constrain a job to not run on same node as another job?

504 views
Skip to first unread message

dma...@istreamplanet.com

unread,
Jun 7, 2018, 5:26:57 PM6/7/18
to Nomad
Hi all.

Is it possible to make it so a job won't run on the same node as another job?  I don't want to use classes or node metadata.  The node situation is fluid and not something I can depend on.  The only real constraint is A and B can't be on the same node.  

In case I'm not being clear, job A and job B will break if they're on the same host, but otherwise I want them to have complete freedom of where to go.  

Thanks!
-Dylan

Chelsea Komlo

unread,
Jun 8, 2018, 11:38:40 AM6/8/18
to dma...@istreamplanet.com, Nomad
Hi,

Currently, it is possible to achieve this using constraints on a per-node basis using node metadata. https://www.nomadproject.io/docs/job-specification/constraint.html

In Nomad 0.9 we will be adding support for job affinities and anti-affinities, which will be first-class support for requiring jobs to run on the same node without relying on specific node metadata. This will achieve a constraints of "job A and B can't be on the same node"  without tying jobs to specific nodes, which will achieve the use case you describe.

Let us know how else we can help,
Chelsea

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/nomad/issues
IRC: #nomad-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Nomad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nomad-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nomad-tool/e72039bd-91b6-4c5c-8197-4d75cbc41a15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages