Sorry about that, I created a local mock last night to check that but
didn't have time to whip up a live test against gce. So your other option
of course is to name any of your manually created instances that have
dashes in the name with a minimum of 3 characters before the dash. That is
a sucky workaround but it will get you past this for now.

Also, if you could create a jira for this we can track the issue and see if
we can remedy this. I won't have much time to dig deeper until later next
week but maybe someone else will be able to look.

Thanks,
Chris

--
Sent from my Android phone
On Aug 8, 2014 9:09 AM, "Sunil Shah" <[email protected]> wrote:

> Hey Chris,
>
> Thanks for the suggestion! Unfortunately that didn't work - Google's
> instance naming convention requires a-z, 0-9 and only hyphens as
> delimiters. This is the error message we got back from their API via
> JClouds - https://gist.github.com/ssk2/4105344aa40aedc246e5
>
> I suspect this could be considered a bug - since those are valid instance
> names (at least according to Google's own naming guidelines). Would be glad
> to hear what other suggestions you have :)
>
> Cheers,
>
> Sunil
>
>
> On Fri, Aug 8, 2014 at 8:05 AM, Chris Custine <[email protected]>
> wrote:
>
>> 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