-
Notifications
You must be signed in to change notification settings - Fork 95
Question: mesos-consul interaction with marathon folder #63
Comments
mesos-consul currently strips '_'s from the task name.
would be registered as
I'm not sure what else we can do. It would be nice to register it as |
thanks for your response. I think service name would make more sense if the underscore was replaced by an hyphen. It would reflect the hierarchy that marathon users are trying to define. What do you think? Maybe we could have this as an option? |
@ChrisAubuchon would you accept a PR to replace Would you prefer to have the replacement character passed as an option and default to blank ? |
Sure. I don't have a preference to be honest. It'd be nice if consul had service groups though. |
Previously underscores where removed when creating the service name. This usually does not correspond to the intent of the user since he set a separator in the task name. In the specific case of marathon, the folder separator is converted to underscore when creating a mesos task. Users in marathon sets: /mygroup/mysubgroup/myapp Tasks name is mesos are: mygroup_mysubgroup_myapp.[guid] Before this patch, consul service names were mygroupmysubgroupmyapp After this patch, consul service names are mygroup-mysubgroup-myapp. Fixes mantl#63
Sadly, I thought mesos-consul uses the task ID to name the service and just discovered it uses the tasks name. In the case of marathon, task name are completely different when using a folder I need to find another patch. |
The behavior is challenged in d2iq-archive/marathon#3163 |
I've implemented a patch to use the taskID instead of the taskName to name services. However I thinks this is very specific (will help only marathon users and might break other frameworks users). @ChrisAubuchon coudl you reopen this issue ? I would be glad to take your input on a way to solve the issue. |
Previously underscores where removed when creating the service name. This usually does not correspond to the intent of the user since he set a separator in the task name. In the specific case of marathon, the folder separator is converted to underscore when creating a mesos task. Users in marathon sets: /mygroup/mysubgroup/myapp Tasks name is mesos are: mygroup_mysubgroup_myapp.[guid] Before this patch, consul service names were mygroupmysubgroupmyapp After this patch, consul service names are mygroup-mysubgroup-myapp. Fixes mantl#63
Marathon framework recently introduced folders to group application.
The effect on mesos task is to prefix the task name by the name of the prefix and an underscore. For instance:
will have tasks named:
Consul recommends to use dns compatible names which does not include underscores.
What would be you recommendation to cope with those names?
Could we consider a way to rewrite task names to replace underscores ?
The text was updated successfully, but these errors were encountered: