You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Markus Alexander Kuppe <no...@github.com> on 2018/08/21 20:41:58 UTC

[jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

https://issues.apache.org/jira/browse/JCLOUDS-1339

Please consider including in next 2.1.x release.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1235

-- Commit Summary --

  * JCLOUDS-1339: Support launching an x1 EC2 instance

-- File Changes --

    M apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java (38)
    M apis/ec2/src/main/java/org/jclouds/ec2/domain/InstanceType.java (26)
    M providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/compute/suppliers/AWSEC2HardwareSupplier.java (4)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1235.patch
https://github.com/jclouds/jclouds/pull/1235.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

[minor] do you think it is still a valid comment? Look quite unusual to not deploy on a VPC these days, is it still important to filter those instance types

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#pullrequestreview-148559738

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Ignasi Barrera <no...@github.com>.
nacx commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

Yep. Instead of abusing the `deprecated` thing we should add a method that says `requiresVPC()` or similar to properly mark those hardware profiles, and remove that ugly and confusing comment, but that's for another PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212408537

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Markus Alexander Kuppe <no...@github.com>.
lemmy commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

@andreaturli I just copied this from https://github.com/jclouds/jclouds/blob/cf67233765855a850e40f4b3d3b3ba320678dbbd/apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java#L218-L230 assuming the same reasoning applies to X1 instances.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212018738

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Andrea Turli <no...@github.com>.
thanks @lemmy for your contribution! only a minor comment from my side otherwise looks sensible.

This manual process is really tedious, thanks for helping us out!

I wish AWS will offer a simple instanceTypes API at some point!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#issuecomment-415090459

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

Thanks @lemmy

@nacx any thoughts on this?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212064403

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Markus Alexander Kuppe <no...@github.com>.
lemmy commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

Thanks

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212399157

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Andrea Turli <no...@github.com>.
andreaturli commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

I think it makes sense. I'll merge it asap

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212389076

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Markus Alexander Kuppe <no...@github.com>.
lemmy commented on this pull request.



> @@ -290,6 +290,19 @@ private EC2HardwareBuilder hs1() {
       virtualizationTypes(VirtualizationType.HVM, VirtualizationType.PARAVIRTUAL);
       return this;
    }
+   
+   private EC2HardwareBuilder x1() {
+	      virtualizationTypes(VirtualizationType.HVM);
+	      
+	      // TODO X1 is not deprecated, but it requires that you are using a VPC
+	      // until we have a way for hardware instances to be filtered based on network
+	      // we do NOT want X1 selected automatically.
+	      // You get: org.jclouds.aws.AWSResponseException: request POST https://ec2.eu-west-1.amazonaws.com/ HTTP/1.1 failed with code 400, error: AWSError{requestId='2300b99e-ddc0-42ab-b1ed-9d628a161be4', requestToken='null', code='VPCResourceNotSpecified', message='The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.', context='{Response=, Errors=}'}
+	      // A user can explicitly request a x1 if they are also setting up a VPC.
+	      deprecated();

May I ask to split the discussion about the deprecation - since it also applies to the existing t2 instance type - into a separate issue? I wait for the x1 support to be included in snapshot builds. Thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#discussion_r212385813

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Ignasi Barrera <no...@github.com>.
nacx approved this pull request.





-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#pullrequestreview-149036803

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Ignasi Barrera <no...@github.com>.
Merged to [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/88f44a6d) and [2.1.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/ca063d8b). Thanks @lemmy!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#issuecomment-415522613

Re: [jclouds/jclouds] JCLOUDS-1339: Support launching an x1 EC2 instance (#1235)

Posted by Ignasi Barrera <no...@github.com>.
Closed #1235.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1235#event-1806022560