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

Getting-Started-Guide not working as expected #13085

Closed
fraenku opened this issue May 20, 2022 · 3 comments
Closed

Getting-Started-Guide not working as expected #13085

fraenku opened this issue May 20, 2022 · 3 comments
Labels

Comments

@fraenku
Copy link

fraenku commented May 20, 2022

Nomad version

Nomad v1.3.0 (52e95d6)

Operating system and Environment details

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"

Issue

I am following the getting-started section on https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started.
However when running the job example.nomad I have the error:
2022-05-20T11:54:41+02:00: Task Group "cache" (failed to place 1 allocation):
* Constraint "${attr.consul.version} semver >= 1.7.0": 1 nodes excluded by filter

Reproduction steps

Expected Result

Having a successful deployment
Deployment "cd5820be" successful

Actual Result

The job is not deployed successfully due to the error
2022-05-20T11:54:41+02:00: Task Group "cache" (failed to place 1 allocation):
* Constraint "${attr.consul.version} semver >= 1.7.0": 1 nodes excluded by filter

Job file (if appropriate)

I think it is related to the service-part
service {
name = "redis-cache"
tags = ["global", "cache"]
port = "db"

  # The "check" stanza instructs Nomad to create a Consul health check for
  # this service. A sample check is provided here for your convenience;
  # uncomment it to enable it. The "check" stanza is documented in the
  # "service" stanza documentation.

  # check {
  #   name     = "alive"
  #   type     = "tcp"
  #   interval = "10s"
  #   timeout  = "2s"
  # }
}

After removing it, the job is deployed successfully.

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

@jrasell
Copy link
Member

jrasell commented May 20, 2022

Hi @fraenku and thanks for raising this issue.

As you identified, Nomad v.1.3.0 introduced implicit constraints for task groups which utilise Consul for service discovery. The getting started guide does not run Consul which causes this problem.

The fix has already been merged into main via #13044 which changes the example job to use Nomad for service discovery. This will be available in an upcoming Nomad point release. I'l therefore close this issue out.

Please reach out if you experience additional problems!

@jrasell jrasell closed this as completed May 20, 2022
@fraenku
Copy link
Author

fraenku commented Aug 9, 2022

Thanks a lot for the fast response and quick update! I've seen that it has been fixed now with version 1.3.3 and that also redis has been updated to version 7.

However the documentation at https://learn.hashicorp.com/tutorials/nomad/get-started-jobs?in=nomad/get-started is still working with redis 3. At the next occasion this should also be updated.

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Dec 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants