jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <n...@apache.org>
Subject Re: Creating io1 volumes in E2C
Date Sat, 28 Feb 2015 07:22:10 GMT
That's great!

Thanks for investigating this.

There is a live test that is currently failing because of this, so we
should see it go green once we apply a fix.

Do you want to try fixing it and sending a PR? I'm AFK this weekend, but
I'll be available on Monday to help you or to have a look and fix it myself.

Thanks for the feedback!
El 28/02/2015 03:27, "Ruben Rubio Rey" <tk421.1@gmail.com> escribió:

> Hi,
>
> I received the reply from support. I think it makes sense. Hopefully can
> help to solve the problem in JClouds.
>
> """
> The error is misleading. BlockDeviceMapping.1 is the root device /dev/sda1
> defined in the AMI. If you want another device, you should use a separate
> BlockDeviceMapping.2
>
> For example with the AWS CLI: aws ec2 run-instances --key-name $KEY
> --image-id $AMI --instance-type $TYPE --query 'Instances[*].InstanceId'
> --output text --block-device-mappings
> '[{"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":30,"VolumeType":"gp2"}},{"DeviceName":"xvdb","VirtualName":"ephemeral0"}]'
> --debug 2>err
>
> BlockDeviceMapping:
> http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.html
> """
>
> Regards,
> Ruben
>
> On Wed, Feb 11, 2015 at 6:45 PM, Ruben Rubio Rey <tk421.1@gmail.com>
> wrote:
>
>>
>> I will try contacting support.
>>
>> I will post news here.
>>
>>
>>
>> On Wed, Feb 11, 2015 at 5:53 PM, Ignasi Barrera <nacx@apache.org> wrote:
>>
>>> Hi Ruben,
>>>
>>> This is something we've already detected as there is a live test failing
>>> just for this reason. Unfortunately, I think it is an issue on the AWS side.
>>>
>>> I've been investigating it, but the API call jclouds makes is correct
>>> according to their docs. The only thing I've found is this thread [1] in
>>> their developers forum, but it has no answers. Perhaps you can open a new
>>> thread there or ask in a support channel? We'd also love to understand why
>>> that is failing.
>>>
>>> I.
>>>
>>> [1] https://forums.aws.amazon.com/thread.jspa?threadID=158544
>>> El 11/02/2015 05:22, "Ruben Rubio Rey" <tk421.1@gmail.com> escribió:
>>>
>>> Hi eveyone,
>>>>
>>>> It is my first message to this mailing list. I have been using jclouds
>>>> for a while but I feel that I need some help to do some basic tasks.
>>>>
>>>> I am creating an instance in E2C and I would like to add an extra io1
>>>> volume, but I am having problems:
>>>>
>>>>         final String POLL_PERIOD_TWENTY_SECONDS = String.valueOf(SECONDS.toMillis(20));
>>>>
>>>>         Properties overrides = new Properties();
>>>>         overrides.setProperty(ComputeServiceProperties.POLL_INITIAL_PERIOD,
POLL_PERIOD_TWENTY_SECONDS);
>>>>         overrides.setProperty(ComputeServiceProperties.POLL_MAX_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
>>>>
>>>>         Iterable<Module> modules = ImmutableSet.<Module> of(new
SshjSshClientModule(), new SLF4JLoggingModule());
>>>>         //Iterable<Module> modules = ImmutableSet.<Module> of(new
SshjSshClientModule());
>>>>
>>>>         ComputeServiceContext context = ContextBuilder.newBuilder("aws-ec2")
>>>>                 .credentials("xxx", "xxx")
>>>>                 .modules(modules)
>>>>                 .overrides(overrides)
>>>>                 .buildView(ComputeServiceContext.class);
>>>>         ComputeService computeService = context.getComputeService();
>>>>
>>>> //      UBUNTU
>>>>         Template template = computeService.templateBuilder()
>>>>                 .locationId("us-east-1")
>>>>                 .imageId("us-east-1/ami-7c807d14")
>>>>                 .hardwareId("t1.micro")
>>>>                 .build();
>>>>
>>>>         // Cant mount straight away (maybe needed to create partition and
format ?)
>>>>         // template.getOptions().as(EC2TemplateOptions.class).mapNewVolumeToDeviceName("/dev/sdm",
100, true );
>>>>         template.getOptions().as(EC2TemplateOptions.class).mapNewVolumeToDeviceName("/dev/sdm",
100, true, "io1", null, false );
>>>>
>>>>
>>>> 15:14:47.284 [main] DEBUG jclouds.wire - >>
>>>> "Action=RunInstances&ImageId=ami-7c807d14&MinCount=1&MaxCount=1&InstanceType=t1.micro&SecurityGroup.1=jclouds%23m456&KeyName=jclouds%23m456%23f05&UserData=I2Nsb3VkLWNvbmZpZwpyZXBvX3VwZ3JhZGU6IG5vbmUK&BlockDeviceMapping.1.DeviceName=/dev/sdm&BlockDeviceMapping.1.Ebs.VolumeSize=100&BlockDeviceMapping.1.Ebs.DeleteOnTermination=true&BlockDeviceMapping.1.Ebs.VolumeType=io1&Version=2012-06-01"
>>>> 15:14:47.285 [main] DEBUG jclouds.headers - >> POST
>>>> https://ec2.us-east-1.amazonaws.com/ HTTP/1.1
>>>> 15:14:47.285 [main] DEBUG jclouds.headers - >> Host:
>>>> ec2.us-east-1.amazonaws.com
>>>> 15:14:47.286 [main] DEBUG jclouds.headers - >> X-Amz-Date:
>>>> 20150211T041447Z
>>>> 15:14:47.286 [main] DEBUG jclouds.headers - >> Authorization:
>>>> AWS4-HMAC-SHA256 Credential=xx/20150211/us-east-1/ec2/aws4_request,
>>>> SignedHeaders=content-type;host;x-amz-date,
>>>> Signature=83fd5d0d5723e87b03ff274d503e5a3952851ce0091dbf9fa42113b1a778ca8d
>>>> 15:14:47.286 [main] DEBUG jclouds.headers - >> Content-Type:
>>>> application/x-www-form-urlencoded
>>>> 15:14:47.287 [main] DEBUG jclouds.headers - >> Content-Length: 388
>>>> 15:14:47.771 [main] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService -
>>>> Receiving response 1653682173: HTTP/1.1 400 Bad Request
>>>> 15:14:47.771 [main] DEBUG jclouds.headers - << HTTP/1.1 400 Bad Request
>>>> 15:14:47.771 [main] DEBUG jclouds.headers - << Date: Wed, 11 Feb 2015
>>>> 04:14:46 GMT
>>>> 15:14:47.772 [main] DEBUG jclouds.headers - << Transfer-Encoding:
>>>> chunked
>>>> 15:14:47.772 [main] DEBUG jclouds.headers - << Server: AmazonEC2
>>>> 15:14:47.772 [main] DEBUG jclouds.headers - << Cneonction: close
>>>> 15:14:47.772 [main] DEBUG jclouds.headers - << Content-Type:
>>>> application/unknown
>>>> 15:14:47.772 [main] DEBUG jclouds.wire - << "<?xml version="1.0"
>>>> encoding="UTF-8"?>[\n]"
>>>> 15:14:47.773 [main] DEBUG jclouds.wire - <<
>>>> "<Response><Errors><Error><Code>UnknownParameter</Code><Message>The
>>>> parameter VolumeType is not
>>>> recognized</Message></Error></Errors><RequestID>e37d4d05-dbd4-45d7-bfd6-2c39e43a48c2</RequestID></Response>"
>>>>
>>>> org.jclouds.aws.AWSResponseException: request POST
>>>> https://ec2.us-east-1.amazonaws.com/ HTTP/1.1 failed with code 400,
>>>> error: AWSError{requestId='e37d4d05-dbd4-45d7-bfd6-2c39e43a48c2',
>>>> requestToken='null', code='UnknownParameter', message='The parameter
>>>> VolumeType is not recognized', context='{Response=, Errors=}'}
>>>>
>>>> But as far I understand io1 is an accepted value for the VolumeType as
>>>> specified here:
>>>> http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
>>>>
>>>> If I run the code with
>>>>
>>>> template.getOptions().as(EC2TemplateOptions.class).mapNewVolumeToDeviceName("/dev/sdm",
100, true );
>>>>
>>>> it works, but if I try to specify the volume type it fails.
>>>>
>>>> How can I create an extra volume specifying the volume type ?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Ruben
>>>>
>>>>
>>
>

Mime
View raw message