Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.8.1, 1.9.0, 1.9.1
-
None
Description
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.
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
Note: I have only tested this with version 1.8.1 and I am calling jclouds from inside a jenkins plugin.