-1

I need some help, I have 3 nomad as servers and client. I want to run a Job (Nginx) in 2 instances but it gives me this error. How can I fixed this?

Scheduler dry-run:
 - WARNING: Failed to place all allocations.
  Task Group "nginx" (failed to place 1 allocation):
   * Constraint "computed class ineligible" filtered 2 nodes
   * Constraint "distinct_hosts" filtered 1 nodes
rkevx21
  • 2,441
  • 5
  • 19
  • 40

1 Answers1

1

So it seems that two of your instances are considered ineligible for job allocation. Nomad clients can exist in different modes, such as "eligible" and "drain". If your Nomad client is not marked as eligible, it will not accept placements of allocations. You can change the eligibility of a Nomad client by using the command line tool which is described here: https://www.nomadproject.io/docs/commands/node/eligibility.html

Furthermore, since you are using the distinct_hosts constraint, you are forcing Nomad to place allocations for your job on distinct machines, rather than colocating them on the same machine. Given you have two ineligible Nomad client machines out of a three (if I am reading you right), and you are trying to place 2 allocations that are required to be on different machines, it cannot place both allocations on the one machine that is eligible.

Chris Zacharias
  • 608
  • 5
  • 7