Hi Sunil,
Basically your naming scheme is conflicting with the way jclouds encodes group 
names in the instance name by default. jclouds is looking at existing instances 
to see if they are a member of the group and since your naming matches the 
jclouds default scheme, it is also applying a bit of validation when it parses 
the name. I think your quickest workaround is to change the jclouds group 
delimiter like this:

props.put(ComputeServiceProperties.RESOURCENAME_DELIMITER, "_”);

This way jclouds won’t match on the two letter + “-“.  I’m trying to figure out 
if we should consider this a bug or if it is just a nuance that has to be 
documented somewhere.  There are other less savory options as well, so let me 
know if this doesn’t work out for you for whatever reason.

Thanks,
Chris

--  
Chris Custine


On August 7, 2014 at 3:53:56 PM, Sunil Shah ([email protected]) wrote:
> Hey all,
>  
> We've been running into a bug that has us a little stumped. When we have an
> existing (manually created) instance in our GCE project which begins with a
> two letter name and then a hyphen (e.g. "ss-production"). This doesn't
> appear to happen when we have instances with just two letter names (e.g.
> "ss").
>  
> When calling:
> val node = computeService.createNodesInGroup(name, 1, template)
>  
> we get an exception:
>  
> java.lang.IllegalArgumentException: Object 'ss' doesn't match dns
> naming constraints. Reason: Can't be null or empty. Length must be 3
> to 63 symbols..
>  
> The full stack trace is here, we're using JClouds 1.7.3:
> https://gist.github.com/ssk2/853ba032135c60621a9a
>  
> I can't figure out where the offending logic is that would cause this
> problem in JClouds - any pointers would be useful, as well as any
> workarounds that don't involve renaming existing instances.
>  
> Cheers,
>  
> Sunil
>  

Reply via email to