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

nsd: updating a job with service in nomad provider causes agent error logs #16286

Open
shoenig opened this issue Mar 1, 2023 · 0 comments
Open

Comments

@shoenig
Copy link
Member

shoenig commented Mar 1, 2023

While debugging #16238 I noticed just updating a job with a service in the nomad provider can trigger agent Error logs, e.g.

2023-03-01T08:57:24.160-0600 [ERROR] nomad.fsm: DeleteServiceRegistrationByID failed: error="service registration not found"
2023-03-01T08:57:24.160-0600 [ERROR] client.rpc: error performing RPC to server: error="rpc error: service registration not found" rpc=ServiceRegistration.DeleteByID server=127.0.0.1:4647
2023-03-01T08:57:24.160-0600 [ERROR] client.rpc: error performing RPC to server which is not safe to automatically retry: error="rpc error: service registration not found" rpc=ServiceRegistration.DeleteByID server=127.0.0.1:4647
2023-03-01T08:57:24.160-0600 [INFO]  client.service_registration.nomad: attempted to delete non-existent service registration: service_id=_nomad-task-ef1dd8fa-b15c-4d9e-3fc4-bede2397bbea-group-group-test-http namespace=default

Unclear if these are benign (the end result is OK - the expected service is in the registry).

To update just change meta.version.

job "bug" {
  group "group" {

    restart {
      interval = "3m"
      attempts = 3
      delay    = "15s"
      mode     = "delay"
    }

    network {
      port "http" { to = 8080 }
    }
    
    meta {
      version = 2
    }

    service {
      name         = "test"
      port         = "http"
      address_mode = "host"
      tags         = []
      provider     = "nomad"
      check {
        type     = "http"
        port     = "http"
        path     = "/"
        interval = "12s"
        timeout  = "6s"

        check_restart {
          limit = 3
          grace = "10s"
        }
      }
    }

    task "task" {
      driver = "docker"
      config {
        image   = "python:3"
        command = "python3"
        args    = ["-m", "http.server", "${NOMAD_PORT_http}"]
        ports   = ["http"]
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Roadmapping
Development

No branches or pull requests

2 participants