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

system job fails to update service tags #9358

Closed
fredwangwang opened this issue Nov 13, 2020 · 4 comments
Closed

system job fails to update service tags #9358

fredwangwang opened this issue Nov 13, 2020 · 4 comments

Comments

@fredwangwang
Copy link
Contributor

Nomad version

0.12.5

Operating system and Environment details

Linux + Consul 1.8.3

Issue

Normally redeploy a job with an updated service tags will trigger the service registration update as well.
However, that doesn't seem to be the case right now for system type jobs.

Reproduction steps

  1. Deploy the job file below
  2. Change the tags
- tags = ["http", "example-v1"]
+ tags = ["http", "example-v2"] 
  1. Redeploy the job file
  2. The service registration in Consul is not updated.

Job file (if appropriate)

job "example-job-system" {
  region      = "global"
  datacenters = ["dc1"]
  type        = "system"

  group "example-service-api-group" {
    count = 1

    network {
      mode = "bridge"
    }

    service {
      name = "example-system-service"
      port = "8082"
      tags = ["http", "example-v1"]
    }

    task "example-fake" {
      driver = "docker"

      config {
        image = "nicholasjackson/fake-service:v0.12.0"
      }

      env {
        LISTEN_ADDR = "0.0.0.0:8080"
      }
    }
  }
}

@fredwangwang
Copy link
Contributor Author

verified also adding the check does not trigger service registration update neither.

@drewbailey
Copy link
Contributor

Thank you for reporting @fredwangwang, I was able to reproduce this in 0.12.9 and tested in 1.0.1 and believe the issue has been fixed.

Here is the error that was blocking the consul sync operation.

   * update hook "group_services" failed: unable to get address for service "example-system-service": invalid port "8082": port label not found
"

Could you please confirm you are no longer running into this issue?

@fredwangwang
Copy link
Contributor Author

Hi @drewbailey I dont have a 1.0.1 setup right now but if you verified its been fixed, happy to close it.
Btw, could you point me to the code change that fixes the issue? Curious to know :)

@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 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants