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

failures_before_critical does not get updated #10678

Closed
evandam opened this issue Jun 1, 2021 · 3 comments · Fixed by #10764
Closed

failures_before_critical does not get updated #10678

evandam opened this issue Jun 1, 2021 · 3 comments · Fixed by #10764
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul type/bug
Milestone

Comments

@evandam
Copy link

evandam commented Jun 1, 2021

Nomad version

Nomad v1.1.0

Operating system and Environment details

Ubuntu 18.04

Issue

When changing failures_before_critical, Nomad does not show a change in the value, always setting it to 0. I have also tried changing the meta.uuid field to force a deployment but the value stays at 0.

Reproduction steps

Change the failures_before_critical value in the health check in the job file below.

Expected Result

Value changes as expected

Actual Result

Value remains at zero.

Job file (if appropriate)

job "dev-ops-httpbin" {
  meta {
    uuid = "51618dd2-5b10-44b6-8704-78e4d8b5b2e4"
    image_tag = "latest"
  }

  datacenters = ["dev-usw2-dev1"]

  type = "service"

  group "app" {
    count = 1

    network {
      port "http" {
        to = 80
      }
    }

    service {
      name = "${JOB}"
      port = "http"

      check {
        name     = "httpbin-ping"
        type     = "http"
        path     = "/anything"
        interval = "5s"
        timeout  = "2s"
        # TODO: Change this and plan again
        failures_before_critical = 3
      }
    }

    task "dev-ops-httpbin" {
      driver = "docker"

      config {
        image = "kennethreitz/httpbin:${NOMAD_META_image_tag}"
        ports = ["http"]
        force_pull  = true
        dns_servers = ["172.17.0.1"]
      }

      resources {
        cpu    = 100
        memory = 50
      }
    }
  }
}

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

@scalp42
Copy link
Contributor

scalp42 commented Jun 1, 2021

Is there a way to see the check params on Consul API side to actually confirm what's being passed?

@shoenig shoenig added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul labels Jun 4, 2021
@shoenig
Copy link
Member

shoenig commented Jun 4, 2021

Thanks for reporting this, @evandam ! Indeed it looks like we're losing the value set for these somewhere, probably in the round trip from HCL to JSON.

$ nomad job inspect example | jq -r .Job.TaskGroups[0].Services[0].Checks[0].FailuresBeforeCritical
0

Just FYI there's a Consul bug around these fields regardless, which probably needs to be fixed before they're useful
hashicorp/consul#10256

@shoenig shoenig added this to Needs Triage in Nomad - Community Issues Triage via automation Jun 4, 2021
@shoenig shoenig moved this from Needs Triage to In Progress in Nomad - Community Issues Triage Jun 4, 2021
@shoenig shoenig self-assigned this Jun 4, 2021
Nomad - Community Issues Triage automation moved this from In Progress to Done Jun 15, 2021
@shoenig shoenig added this to the 1.1.2 milestone Jun 15, 2021
@github-actions
Copy link

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 Oct 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul type/bug
Projects
None yet
3 participants