Error while attaching EBS volume to an instance

51 views
Skip to first unread message

Jai

unread,
Jun 18, 2012, 7:03:39 PM6/18/12
to jcl...@googlegroups.com
I am trying to create a EBS volume and attach it to an instance and I get the following error. 

java.lang.IllegalArgumentException: requested location us-east-1a, which is not in the configured locations: {sa-east-1=com.google.common.base.Suppliers$SupplierOfInstance@27077aa7, ap-northeast-1=com.google.common.base.Suppliers$SupplierOfInstance@5c057df5, eu-west-1=com.google.common.base.Suppliers$SupplierOfInstance@6c908f05, us-east-1=com.google.common.base.Suppliers$SupplierOfInstance@69dc8f2, us-west-1=com.google.common.base.Suppliers$SupplierOfInstance@60f38b42, us-west-2=com.google.common.base.Suppliers$SupplierOfInstance@153bcbc8, ap-southeast-1=com.google.common.base.Suppliers$SupplierOfInstance@8bfc25c}

at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119)

at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:63)

at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:43)

at org.jclouds.rest.internal.RestAnnotationProcessor.getEndpointInParametersOrNull(RestAnnotationProcessor.java:735)


The following is the test code snippet

private void attachEBS(NodeMetadata node, int sizeGB, String device) {

Volume vol = ebsClient.createVolumeInAvailabilityZone(node.getLocation().getDescription(), sizeGB);

ebsClient.attachVolumeInRegion(node.getLocation().getDescription(), vol.getId(), node.getId(), device);

}


The volume gets created in first line, but the attachVolumeInRegion is throwing the above exception.. Any pointers would be helpful..

Adrian Cole

unread,
Jun 18, 2012, 9:47:02 PM6/18/12
to jcl...@googlegroups.com

Hi, Jai.

I noticed a problem in this call (and similar), which is fixed in the very latest jclouds 1.5.0-beta.3

Can you try it out?
-A

On Monday, June 18, 2012 5:03:39 PM UTC-6, Jai wrote

Jai

unread,
Jun 18, 2012, 11:51:03 PM6/18/12
to jcl...@googlegroups.com
Hi Adrian,

  I tried the same with 1.5.0-beta.3 and still getting similar error. Trace below..

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

java.lang.IllegalArgumentException: requested location us-west-1c, which is not in the configured locations: {sa-east-1=com.google.common.base.Suppliers$SupplierOfInstance@3f9261de, ap-northeast-1=com.google.common.base.Suppliers$SupplierOfInstance@2357566d, eu-west-1=com.google.common.base.Suppliers$SupplierOfInstance@3aeb203b, us-east-1=com.google.common.base.Suppliers$SupplierOfInstance@22911fb5, us-west-1=com.google.common.base.Suppliers$SupplierOfInstance@65b8b5cd, us-west-2=com.google.common.base.Suppliers$SupplierOfInstance@41a7d9e7, ap-southeast-1=com.google.common.base.Suppliers$SupplierOfInstance@72d2ee5d}

at com.google.common.base.Preconditions.checkArgument(Preconditions.java:119)

at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:68)

at org.jclouds.location.functions.RegionToEndpointOrProviderIfNull.apply(RegionToEndpointOrProviderIfNull.java:43)

at org.jclouds.rest.internal.RestAnnotationProcessor.getEndpointInParametersOrNull(RestAnnotationProcessor.java:736)


 -Jai

Adrian Cole

unread,
Jun 18, 2012, 11:56:08 PM6/18/12
to jcl...@googlegroups.com


> Sorry, I didn't read your code carefully the first time.  The second command you are making expects a region arg, and you are passing the zone.  You can add a .getParent() to get the region.

>> --
>> You received this message because you are subscribed to the Google Groups "jclouds" group.
>> To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/PbVlJOL_UdEJ.
>> To post to this group, send email to jcl...@googlegroups.com.
>> To unsubscribe from this group, send email to jclouds+u...@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/jclouds?hl=en.

Jai

unread,
Jun 19, 2012, 12:14:11 AM6/19/12
to jcl...@googlegroups.com
Thanks Adrian. That worked !!


On Monday, June 18, 2012 8:56:08 PM UTC-7, Adrian Cole wrote:


> Sorry, I didn't read your code carefully the first time.  The second command you are making expects a region arg, and you are passing the zone.  You can add a .getParent() to get the region.
>

>> To unsubscribe from this group, send email to jclouds+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages