jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: Group name not set for new nodes on EC2
Date Mon, 21 Mar 2016 10:29:50 GMT
Regarding the group names thing, jclouds tries to infer the group name
from the security groups and key pairs [1]. When key pairs or security
groups are (indirectly) created as part of the "createNodesInGroup"
call, jclouds applies the naming convention taking into account the
group name. The code that tries to infer the groups for existing
instances seems to rely on that fact, which conflicts with the use
case when security groups or key pairs already exist or are created
using the security group extension (which has no "group" parameter).

This could definitely be done better by applying tags to the created
instance, or whatever, so mind filing a JIRA issue with the code
snippet you pasted, so we can properly track and improve this?


[1] https://github.com/jclouds/jclouds/blob/master/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/RunningInstanceToNodeMetadata.java#L186-L194
[2] https://issues.apache.org/jira/browse/JCLOUDS

On 20 March 2016 at 13:31, Andrew Phillips <andrewp@apache.org> wrote:
> On 2016-03-20 10:00, cen wrote:
>> Agree with both statements. If there was documentation about this on
>> createSecurityGroup I'd knew instantly what is going on. It could even
>> be a generic statement that a certain method adheres to
>> GroupNamingConvention.
>> The pattern does not really match my use case because I create a single
>> security group on first run and then re-use it for each new VM (that's
>> why I hardcoded the name).
> Ah, like that - in that case, I would imagine Ignasi's suggestion of either
> setting the RESOURCENAME_PREFIX property, or going a step further and
> actually overriding the naming convention "generator", might be the right
> thing to do?
> Then you *know* exactly what the resources will look like, and don't have to
> save that information for reuse later.
> Regards
> ap

View raw message