[ https://issues.apache.org/jira/browse/JCLOUDS-908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14553002#comment-14553002 ]
Daniel Broudy commented on JCLOUDS-908: --------------------------------------- Do we want to filter out instances that do not match the naming convention when we do BaseComputeService#listNodes like we do with firewall tags or do we want to display all instances? > BaseComputeService#listNodes throwing an exception > -------------------------------------------------- > > Key: JCLOUDS-908 > URL: https://issues.apache.org/jira/browse/JCLOUDS-908 > Project: jclouds > Issue Type: Sub-task > Components: jclouds-compute, jclouds-labs-google > Affects Versions: 1.8.1, 1.9.0 > Reporter: Pedro Ribeiro > > If I have an instance named "j-t2", then when I call > BaseComputeService#listNodes, I get the following error. The 'j' in the > exception seems to result from some manipulation of the instance name. > {code} > Caused by: java.lang.IllegalArgumentException: Object 'j' doesn't match dns > naming constraints. Reason: Can't be null or empty. Length must be 3 to 63 > symbols.. > at > org.jclouds.predicates.validators.DnsNameValidator.exception(DnsNameValidator.java:74) > at > org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:51) > at > org.jclouds.predicates.validators.DnsNameValidator.validate(DnsNameValidator.java:36) > at > org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.checkGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:124) > at > org.jclouds.compute.internal.FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.sharedNameForGroup(FormatSharedNamesAndAppendUniqueStringToThoseWhichRepeat.java:120) > at > org.jclouds.googlecomputeengine.compute.functions.FirewallTagNamingConvention$Factory.get(FirewallTagNamingConvention.java:39) > at > org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:89) > at > org.jclouds.googlecomputeengine.compute.functions.InstanceInZoneToNodeMetadata.apply(InstanceInZoneToNodeMetadata.java:51) > at > shaded.com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216) > at > shaded.com.google.common.collect.Iterators$8.transform(Iterators.java:799) > at > shaded.com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) > at > shaded.com.google.common.collect.Iterators$7.computeNext(Iterators.java:651) > at > shaded.com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) > at > shaded.com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) > at shaded.com.google.common.collect.Iterators.addAll(Iterators.java:361) > at shaded.com.google.common.collect.Iterables.addAll(Iterables.java:354) > at shaded.com.google.common.collect.Sets.newLinkedHashSet(Sets.java:328) > at > org.jclouds.compute.internal.BaseComputeService.listNodes(BaseComputeService.java:335) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:40) > at com.sun.proxy.$Proxy107.listNodes(Unknown Source) > at > jenkins.plugins.jclouds.compute.JCloudsCloud.getRunningNodesCount(JCloudsCloud.java:389) > at > jenkins.plugins.jclouds.compute.JCloudsCloud.doProvision(JCloudsCloud.java:372) > ... 73 more > {code} > *Note*: I have only tested this with version 1.8.1 and I am calling jclouds > from inside a jenkins plugin. -- This message was sent by Atlassian JIRA (v6.3.4#6332)