Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when writing security groups for clusters using spot instances #620

Open
nathanieldchu opened this issue Aug 6, 2018 · 1 comment

Comments

@nathanieldchu
Copy link

I have run into errors when trying to use spot instances for a starcluster. The errors appear to be specific to when spot instances are requested.

The configuration in question is

### THIS BLOCK IS UNSUCCESSFUL AND PROMPTS THE ERROR BELOW
# add test cluster
[cluster test]
# Declares that this cluster uses smallcluster as defaults
EXTENDS=smallcluster
# number of ec2 instances to launch
CLUSTER_SIZE = 10
# choose instance type
NODE_INSTANCE_TYPE = m1.large
# Set SPOT instance bid
SPOT_BID = 0.02 #IF THIS LINE IS COMMENTED OUT, NO ERRORS ARE ENCOUNTERED
#add volumes of persistant storage
VOLUMES = test

The error output is the following:

StarCluster - (http://star.mit.edu/cluster) (v. 0.95.6)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to [email protected]

>>> Validating cluster template settings...
>>> Cluster template settings are valid
>>> Starting cluster...
>>> Launching a 10-node cluster...
>>> Launching master node (ami: ami-765b3e1f, type: m1.large)...
>>> Creating security group @sc-test...
!!! ERROR - UnauthorizedOperation: You are not authorized to perform this operation.
Traceback (most recent call last):
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cli.py", line 274, in main
    sc.execute(args)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/commands/start.py", line 244, in execute
    validate_running=validate_running)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 1628, in start
    return self._start(create=create, create_only=create_only)
  File "", line 2, in _start
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/utils.py", line 112, in wrap_f
    res = func(*arg, **kargs)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 1643, in _start
    self.create_cluster()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 1161, in create_cluster
    self._create_spot_cluster()
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 1217, in _create_spot_cluster
    force_flat=force_flat)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 894, in create_node
    spot_bid=spot_bid, force_flat=force_flat)[0]
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 926, in create_nodes
    cluster_sg = self.cluster_group.name
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/cluster.py", line 655, in cluster_group
    vpc_id=vpc_id)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/starcluster/awsutils.py", line 296, in create_group
    sg = self.conn.create_security_group(name, description, vpc_id=vpc_id)
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/boto/ec2/connection.py", line 3003, in create_security_group
    SecurityGroup, verb='POST')
  File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/boto/connection.py", line 1208, in get_object
    raise self.ResponseError(response.status, response.reason, body)
EC2ResponseError: EC2ResponseError: 403 Forbidden

UnauthorizedOperationYou are not authorized to perform this operation.5bc119e0-84cf-4c4e-8372-0aa445c2c728

Any idea why spot instances would be throwing this error? Thanks for your effort! I might try some difference parameters to see if any other variations will work.

@nathanieldchu
Copy link
Author

Ah, interesting. These setting appear to work as long as you don't use the first generation (m1) of instances. Unsure of why. My problem is solved; I'm happy to use the more recent instances. This issue is likely not worth much time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant