hmm I'm suspect of the checkGroup here. I think the line could be removed since this is a predicate, not a supplier of groups used to create instances.
https://github.com/jclouds/jclouds/blob/master/compute/src/main/java/org/jclouds/compute/internal/FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java#L152 @Override public Predicate<String> containsGroup(final String group) { checkGroup(group); On Sat, Aug 9, 2014 at 12:15 PM, Daniel Widdis (JIRA) <[email protected]> wrote: > > [ > https://issues.apache.org/jira/browse/JCLOUDS-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091866#comment-14091866 > ] > > Daniel Widdis edited comment on JCLOUDS-657 at 8/9/14 7:14 PM: > --------------------------------------------------------------- > > I just experienced the same/similar issue in jclouds 1.7.3, except on > Rackspace (rather than GCE) and with deletion rather than creation. > > I was attempting to delete a node with uppercase characters in the name. I > used the following code to attempt to delete by private IP address (in my > case String ipAddr = "10.208.232.65"): > {code} > nodes = computeService > .destroyNodesMatching(new Predicate<NodeMetadata>() { > @Override > public boolean apply(final NodeMetadata input) { > return input.getPrivateAddresses().contains(ipAddr); > } > }); > {code} > > The sole instance on my account at the time was named "Cloud-Server-35". > This code worked successfully many times when I had more than one instance on > the account, but only failed on the last one. I received: > java.lang.IllegalArgumentException: Object 'Cloud-Server' doesn't match dns > naming constraints. Reason: Should be only lowercase. > > Full stack trace at http://pastebin.com/PKuMqkqz > > > was (Author: dbwiddis): > I just experienced the same/similar issue in jclouds 1.7.3, except on > Rackspace (rather than GCE) and with deletion rather than creation. > > I was attempting to delete a node with uppercase characters in the name. I > used the following code to attempt to delete by private IP address (in my > case String ipAddr = "10.208.232.65"): > {code} > nodes = computeService > .destroyNodesMatching(new Predicate<NodeMetadata>() { > @Override > public boolean apply(final NodeMetadata input) { > return input.getPrivateAddresses().contains(ipAddr); > } > }); > {code} > > The sole instance on my account at the time was named "Cloud-Server-35". I > received: > java.lang.IllegalArgumentException: Object 'Cloud-Server' doesn't match dns > naming constraints. Reason: Should be only lowercase. > > Full stack trace at http://pastebin.com/PKuMqkqz > >> createNodesInGroup fails on GCE if there are existing instances which fail >> name validation >> ------------------------------------------------------------------------------------------ >> >> Key: JCLOUDS-657 >> URL: https://issues.apache.org/jira/browse/JCLOUDS-657 >> Project: jclouds >> Issue Type: Bug >> Components: jclouds-labs-google >> Affects Versions: 1.7.3 >> Reporter: Sunil Shah >> Assignee: Chris Custine >> >> JClouds provisioning fails when we try to create nodes in a GCE project that >> has one or more existing instances with names of the format "ss-production" >> - where ss is any two letter string and production is any string. >> These are valid instance names in GCE but fail JClouds validation - which >> seems to split on the hyphen and requires individual components to be >> greater than 3 characters. >> A full stack trace is here: >> https://gist.github.com/ssk2/853ba032135c60621a9a >> I think the offending logic is in this method: >> https://github.com/jclouds/jclouds-labs-google/blob/master/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/compute/functions/InstanceInZoneToNodeMetadata.java#L82 >> - which iterates over all groups. >> To fix, I think it'd be necessary to change how validation happens to >> validate on the entire name. > > > > -- > This message was sent by Atlassian JIRA > (v6.2#6252)
