-
Notifications
You must be signed in to change notification settings - Fork 2k
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
bug: Multiple services with common tag not being registered with Consul #5819
Comments
After testing this some more, it seems that even if you remove the common tag |
We can see it too 💥 @alexdulin |
Thanks for reporting this bug. @alexdulin, your assessment is correct in that, with #5536, we expect task services to have unique names. We are evaluating a proper fix, but we'd recommend using different services names if you upgrade to 0.9.2 or 0.9.3. For us to have some context - mind if you elaborate on your use case please? What advantages do you have by reusing the service name across multiple services? |
@notnoop The use case for us is with tasks that listen on multiple ports for different purposes. Some of our real examples include Elasticsearch, which listens on separate ports for HTTP requests and TCP for cluster level communication, or Logstash which uses multiple ports for various inputs. We distinguish between these using tags, such as This is the same way that Nomad servers register themselves as This feature is a very critical element for our usage of Nomad, and I have a feeling it is for others as well. Without being able to register tasks using a common service name, much of the value of Nomad's integration with Consul is lost. |
Adding my 2 cents of context from other user here, we do have a very similar situation as the one @alexdulin described: a single service exposes more than one port for different purposes (in our case, an Akka application that requires a port for the HTTP API and another port for cluster management). This was working just fine with 0.8.4 and today got bitten by this while upgrading to 0.9.2. If you folks need some extra info or help testing a patch I would be happy to participate. |
Adding my 2 cents here, same with say Sensu for the |
Thanks for the useful feedback. We'll aim to fix this in the next patch release. |
Hey, Please suggest me how i can resolve this issue. |
@Neha-Maurya95 this issue has been closed for a couple years now. Please open a new issue or post on Discuss if you need help. |
Nomad version
Nomad:
Nomad v0.9.2 (028326684b9da489e0371247a223ef3ae4755d87)
Consul:
Consul v1.5.1
Operating system and Environment details
Ubuntu 16.04
Issue
When submitting a job that has multiple service stanzas that use the same service name and a common tag, only the last service stanza will be registered. No other services sharing the same service name and common tag get registered.
In the example below (based off of
nomad job init
), only the last service with tagsglobal
andbar
will be registered, none of the others. Applying this same job to Nomad0.9.1
results in all 3 services being registered in the Consul catalog with the same name and all corresponding tags.Reproduction steps
Job file (if appropriate)
The text was updated successfully, but these errors were encountered: