maheshwarirohit87 / typica

Automatically exported from code.google.com/p/typica
Apache License 2.0
0 stars 0 forks source link

r323 - Creating a volume without a snapshotId fails (at least at Eucalyptus) #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call Jec2.createVolume with snapShotId set to null or ""

What is the expected output? What do you see instead?
It should create a new and empty EBS volume, but it fails with a
NullPointerException in the Eucalyptus log. 

The reason is that Typica passes an empty snapshotId to Eucalyptus, but
Eucalyptus can't process this value.

Solution: if no snapshotId is specified, do not pass the parameter to
Eucalyptus at all.

What version of the product are you using? On what operating system?
Typica r323 with Eucalyptus 1.6

Please provide any additional information below.
There is already a discussion on this topic:
http://groups.google.com/group/typica/browse_thread/thread/bb166c3f8c9aabae/06cd
7842be170124?lnk=raot

And of course I've attached a patch again :)

Original issue reported on code.google.com by frank.bi...@gmail.com on 30 Apr 2010 at 8:25

Attachments:

GoogleCodeExporter commented 9 years ago
In the document,it's shown the description "Creates an EBS volume either by 
size, or from a snapshot"

So it means there're two ways to create the volume, right?

if I just wanna create the volume by size and do I set the field "snapshotId" 
as null ?

And how to set up the field "zone name" ?

I setup the field by using the return value of function 
"describeAvailabilityZones" and try to get the name,state or toString,

But it still fail to create the volume. 

Original comment by kevinwan...@gmail.com on 6 Jul 2010 at 7:38

GoogleCodeExporter commented 9 years ago
Thanks. I've applied the patch

Kevin, You can now call         VolumeInfo vol = ec2.createVolume("512", null, 
"us-east-1a");
for instance.

The AvailabilityZone.getName() value is what you'd pass as the zoneName param.

Original comment by dkavan...@gmail.com on 8 Jul 2010 at 10:43

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r336.

Original comment by dkavan...@gmail.com on 8 Jul 2010 at 10:44

GoogleCodeExporter commented 9 years ago
I use this calling below 

List<AvailabilityZone> availZone = iws.describeAvailabilityZones(null);
VolumeInfo  volInfo = iws.createVolume(volSize,null,availZone.get(0).getName());

It return the exception message "com.xerox.amazonws.ec2.EC2Exception: Problem 
parsing returned message." 

But I'm sure that availZone.get(0).getName() is right.
I'm in the Ecua EC2 environment with typica 1.6

Original comment by kevinwan...@gmail.com on 9 Jul 2010 at 4:31