jtriley / StarCluster

StarCluster is an open source cluster-computing toolkit for Amazon's Elastic Compute Cloud (EC2).
http://star.mit.edu/cluster
GNU Lesser General Public License v3.0
583 stars 313 forks source link

't2.micro' is an unsupported instance type [spot request] #588

Closed 0x5242 closed 7 years ago

0x5242 commented 7 years ago

Edit:

T2 instances are available as On-Demand instances and Reserved Instances, but they are not available as Spot instances, Scheduled Instances, or Dedicated instances. They are also not supported on a Dedicated Host. For more information about these options, see Instance Purchasing Options.

There seem to be a number of instances that are not supported for a spot request, but work when launching a non-spot request. For example, I can use t2.micro if I comment out the "SPOT_BID = 0.50" and the cluster launches and works just fine. However during a spot request:

`>>> Using default cluster template: smallcluster

Validating cluster template settings... Cluster template settings are valid Starting cluster... Launching a 2-node cluster... Launching master node (ami: ami-a1b9fac1, type: t2.micro)... Creating security group @sc-789... Reservation:r-0843cb85080e56572 Launching node001 (ami: ami-a1b9fac1, type: t2.micro) !!! ERROR - InvalidParameterValue: Value (t2.micro) for parameter instanceType is invalid. 't2.micro' is an unsupported instance type Traceback (most recent call last): File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cli.py", line 274, in main sc.execute(args) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\commands\start.py", line 244, in execute validate_running=validate_running) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 1628, in start return self._start(create=create, create_only=create_only) File "", line 2, in _start File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\utils.py", line 112, in wrap_f res = func(_arg, *_kargs) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 1643, in _start self.create_cluster() File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 1161, in create_cluster self._create_spot_cluster() File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 1235, in _create_spot_cluster instance_type=ntype, zone=zone) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 894, in create_node spot_bid=spot_bid, force_flat=force_flat)[0] File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\cluster.py", line 964, in create_nodes resvs.extend(self.ec2.request_instances(image_id, kwargs)) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\awsutils.py", line 521, in request_instances shared_kwargs) File "C:\Python27\lib\site-packages\starcluster-0.95.6-py2.7.egg\starcluster\awsutils.py", line 538, in request_spot_instances return self.conn.request_spot_instances(**kwargs) File "C:\Python27\lib\site-packages\boto\ec2\connection.py", line 1647, in request_spot_instances verb='POST') File "C:\Python27\lib\site-packages\boto\connection.py", line 1186, in get_list raise self.ResponseError(response.status, response.reason, body) EC2ResponseError: EC2ResponseError: 400 Bad Request <?xml version="1.0" encoding="UTF-8"?>

InvalidParameterValueValue (t2.micro) for parameter instanceType is invalid. 't2.micro' is an unsupported instance type0d3eed4d-4ef8-4b4d-8b68-c62a74c26d79`

I can confirm spot requests work when I pick another instance, such as c4.large. I suspect the underlying problem is with the entire T2 family, all of which are broken for spot requests. Its possible other instance types suffer this problem, I did not test them all.

Running

starcluster spothistory t2.micro

Produces

>>> Fetching spot history for t2.micro (VPC) !!! ERROR - no spot price history for the dates specified: None - None

This command does work for me for any instance outside the T2 family. Somewhere in the code T2 is enabled as a valid instance for a normal launch, but is deemed "unsupported" when it comes to spot launches.