-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Registering multiple services from same node/instance with same name #562
Comments
Make the title of the |
@solarkennedy Thanks for reply, we already use it few places but we dont want to do it cause it creates lot of mess.
|
Can we expect fix for this any time soon @solarkennedy, it will be great help ? |
I can imagine (PRs welcome) a fix for Service ID. |
@solarkennedy correct me if am wrong, i was thinking(suggesting) https://github.com/solarkennedy/puppet-consul/blob/master/manifests/install.pp#L5 this part changing it to defined resource or function. |
I'm confused, do you intend to |
@solarkennedy am just trying to register multiple services from same machine, port can be same, name can be same. The issue is with ID of service if it's unique (by default if you don't provide consul generates random uuid) you can register multiple services on same agent with same name same port but technically they will be different cause of ID. But as of now in module we use service name as ID and that's the problem. |
Also sorry for late reply, hope you're well in this difficult times :). |
You are right, in puppet each thing must be unique. How about making your "app_name" have the port in it?
If you want you can specify the id directly too, but in this case you don't have to, it defaults to the title. |
@solarkennedy Hey kyle yes i do it already, problem with this approach is, the services from other end need to do multiple calls, lets say if service is having multiple ports. I have proxysql and it's running on multiple ports lets assume 8080, 8081, 8092 When i want to discover proxysql, I can't get catalog by simply looking for service with proxysql name, i will need to do multiple calls with name-port combination also to make those calls i should know the ports beforehand which beats the whole purpose of service discovery from my opinion. |
Yes Adding ID should do the job :) and i can see it's over writable this should help, thanks. |
Hello Team,
Am trying to register multiple service definition for same service from single instance.
So lets there is service_name : X am trying to register it with
from the same node
This is how it looks in puppet code,
when i try to do this i get error duplicate class it can be define multiple times.
I guess it can be limitation from puppet as well but if we change implementation of consul::service to function or define resource type it can be called multiple times.
The text was updated successfully, but these errors were encountered: