MozillaSecurity / MozillaSecurity/FuzzManager
[GCE] Handle quota exceeded errors.
Open
Nobody has claimed this yet.
gce
spotmanager
- Dominant language
- Python
- Stars
- 208
- Forks
- 48
- Avg merge
- 23h 5m
- Merged PRs (30d)
- 2
Description
Backtrace seen during operation:
start_instances: unhandled error: Traceback (most recent call last):
File "/srv/FuzzManager/server/ec2spotmanager/CloudProvider/CloudProvider.py", line 54, in wrapper
return wrapped(*args, **kwds)
File "/srv/FuzzManager/server/ec2spotmanager/CloudProvider/GCECloudProvider.py", line 171, in start_instances
nodes = cluster.create(instance_type, count, conf, image=image)
File "/srv/laniakea/laniakea/core/providers/gce/manager.py", line 266, in create
nodes = [self.gce.create_node(name, size, image, **meta)]
File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 4129, in create_node
self.connection.async_request(request, method='POST', data=node_data)
File "/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py", line 772, in async_request
response = request(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/libcloud/compute/drivers/gce.py", line 121, in request
response = super(GCEConnection, self).request(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py", line 808, in request
*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py", line 637, in request
response = responseCls(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/libcloud/common/base.py", line 155, in __init__
self.object = self.parse_body()
File "/usr/local/lib/python2.7/dist-packages/libcloud/common/google.py", line 296, in parse_body
raise GoogleBaseError(message, self.status, code)
GoogleBaseError: {u'domain': u'usageLimits', u'message': u"Quota 'CPUS' exceeded. Limit: 24.0 in region asia-south1.", u'reason': u'quotaExceeded'}
We should handle this as a non-critical error as we do for AWS.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in server/ec2spotmanager/CloudProvider/GCECloudProvider.py at start_instances and inspect the wrapper in CloudProvider.py. Compare the existing AWS handling for non-critical errors, then exercise the quotaExceeded case shown in the traceback. Done means GCE quota-exceeded errors are handled as non-critical rather than reported as unhandled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100