Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Replace _ from mesos task name by - #64

Merged
merged 2 commits into from
Feb 22, 2016

Conversation

kamaradclimber
Copy link
Contributor

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 #63

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
@kamaradclimber
Copy link
Contributor Author

@ChrisAubuchon I've implemented the configurable separator.
The first commit hardcodes the hyphen separator, the second one makes it configurable.

I would be happy if any of these two commits are merged.

@ChrisAubuchon
Copy link
Contributor

It doesn't look like the separator is configurable. There needs to be a flags.StringVar in main.go to allow command line configuration. Maybe flags.StringVar(&c.Separator, "group-separator", "", "")

@kamaradclimber
Copy link
Contributor Author

you're right, fixed

ChrisAubuchon added a commit that referenced this pull request Feb 22, 2016
Replace _ from mesos task name by -
@ChrisAubuchon ChrisAubuchon merged commit 2357734 into mantl:master Feb 22, 2016
@rveznaver rveznaver deleted the separator branch July 21, 2016 11:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants