Nomad Service Discovery - Dead/old services still listed after dev reboot #15630
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
stage/duplicate
theme/service-discovery/nomad
type/bug
Nomad version
1.4.3
Operating system and Environment details
Debian Bullseye - single dev server running both server and client modes for testing
Issue
I'm using Nomad service discovery to connect an app container to database and redis services.
There seem to be services from older allocations being presented as live after a series of server reboots - note that only one of these services has an active allocation:
No distinction seems to be made in the service info output so all the entries are provided to the template
Which gives the following output when using a template like:
Obviously these are environment variables so the container is only taking one of them
After running
nomad job stop
the live service is removed from the results but the rest remain:I was unable to fully stop the job, I needed to remove them all manually with
nomad service delete ...
first before the job would consider itself stopped rather than pending.Reproduction steps
Set up a job utilising Nomad service discovery on a cluster with one server and then reboot
Expected Result
Only the currently live service is listed and used in the template
Actual Result
Older dead allocations are presented as live and used in the template
Job file (if appropriate)
Excerpt from task config:
The text was updated successfully, but these errors were encountered: