Skip to content
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

Plugin De-Duplicating EC2 Nodes with same name? #10

Closed
treeves opened this issue Oct 1, 2013 · 12 comments
Closed

Plugin De-Duplicating EC2 Nodes with same name? #10

treeves opened this issue Oct 1, 2013 · 12 comments

Comments

@treeves
Copy link

treeves commented Oct 1, 2013

I have a number of auto-scaling groups that create nodes that, whilst having different EC2 tags, all have the same instance "name". It seems that the plugin is de-duplicating instances that have the same name and is not displaying them as nodes in Rundeck.

I.e. when I log in to the EC2 console, I have 330 running instances that come up. In Rundeck, only 218 appear when I pull with the same key via the EC2 plugin.

Each ASG that I have for each environment (dev, qa, stage, uat, etc) has multiple instances, all with the same instance name (although different tags, security groups, etc). Like:

Name Tag

fff-dev1-cq5-stack AuthorAutoscaleGroup
fff-dev1-cq5-stack PublishAutoscaleGroup
fff-dev1-cq5-stack DispatchAutoscaleGroup

But in Rundeck, only one of the above appears.

Is there something I can do to convince it that different instances are different, even if they have the same name?

@gschueler
Copy link
Member

Rundeck uses the node "name" as the unique identifier. If you have instances with the same "name", you will need to switch to a unique value for the nodename.

I think you would need to use the instanceId as the nodename selector.

The ec2 plugin doesn't really support any composition of values to produce a field value, i think that would be a useful feature however.

@patelgaurang83
Copy link
Contributor

I had the same issue. I solved it by changing the below value in mapping.properties file.

From: nodename.selector=tags/Name,instanceId
To: nodename.selector=instanceId

@scalp42
Copy link

scalp42 commented Feb 23, 2016

Same issue here, with ASGs of more than 10 nodes, only end up seeing 1.

Unfortunately, relying on instanceID makes it non user friendly 🍶

@gschueler
Copy link
Member

@scalp42 would allowing something like tags/Name+instanceId (combine the two) be sufficient?

@scalp42
Copy link

scalp42 commented Feb 23, 2016

yes @gschueler would totally work 👍

I think the only issue is how do you handle something like "$name-$instanceid", meaning with a dash etc and would compounding multiple ones with multiples + allowed, just for thoughts.

@scalp42
Copy link

scalp42 commented Feb 23, 2016

Also, at this point anything would be great but worth mentioning that some folks might have the + in the actual name:

Allowed characters for all regions are letters, spaces, and numbers representable in UTF-8, plus the following special characters: + - = . _ : / @

So tricky at best 🍶

@gschueler
Copy link
Member

It definitely makes the mapping syntax more complicated.

+ allowed in instance names is probably fine, it wouldn't affect the mapping syntax, as the value would be expanded in place.

I was imagining using + to append multiple values. and allowing a quoted value to be a literal string, like:

nodename.selector=tags/Name+'-'+instanceId

would become "$name-$id" effectively

@scalp42
Copy link

scalp42 commented Feb 23, 2016

Oh that makes sense, yeah would totally work!

PS: if I had Java chops, I'd def help 🙊

@gschueler
Copy link
Member

@scalp42 that was recently filed as an issue as well, see #41

the workaround is to configure two instances of the ec2 source

@gschueler
Copy link
Member

@scalp42 sorry i misunderstood. you mean in the rundeck search? you can search tags: mesos-slave+gz-prod

@scalp42
Copy link

scalp42 commented Feb 23, 2016

@gschueler got it :)

@wilddog64
Copy link

wilddog64 commented Apr 8, 2016

does this get resolved in rundeck 2.6.4? I am more interesting to know how to setup this from the mappingParam at UI level. Now I have the syntax like this,

description.default=tags/Name;nodename.selector=privateDnsName;hostname.selector=privateIpAddress;

Although it mapped the node, but it can't de-deplicate the node instances. I'd like to see one to many mapping for my autoscaling group: X --> x1, x2, x3, ... xN.

How can I accomplish that by mappingParams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants