google / caliban

Research workflows made easy, locally and in the Cloud.
https://caliban.readthedocs.io
Apache License 2.0
495 stars 67 forks source link

Insufficient quota in GCP free trial account #66

Closed eschnett closed 4 years ago

eschnett commented 4 years ago

I want to create a cluster. After working around #65, I encounter a quota error because my 12 month free trial account apparently doesn't have enough IP addresses (I have 8, but need 12):

$ caliban cluster create --cluster_name einsteintoolkit-cluster --zone us-central1-a
I0801 23:46:03.689018 4536327616 cli.py:185] creating cluster einsteintoolkit-cluster in project fifth-curve-272318 in us-central1-a...
I0801 23:46:03.689273 4536327616 cli.py:186] please be patient, this may take several minutes
I0801 23:46:03.689368 4536327616 cli.py:188] visit https://console.cloud.google.com/kubernetes/clusters/details/us-central1-a/einsteintoolkit-cluster?project=fifth-curve-272318 to monitor cluster creation progress
W0801 23:46:06.863384 4536327616 http.py:123] Invalid JSON content from response: b'{\n  "error": {\n    "code": 403,\n    "message": "Insufficient regional quota to satisfy request: resource \\"IN_USE_ADDRESSES\\": request requires \'12.0\' and is short \'4.0\'. project has a quota of \'8.0\' with \'8.0\' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=fifth-curve-272318.",\n    "status": "PERMISSION_DENIED"\n  }\n}\n'
E0801 23:46:06.868414 4536327616 util.py:68] exception in call <function Cluster.create at 0x7feba0b13dd0>:
<HttpError 403 when requesting https://container.googleapis.com/v1beta1/projects/fifth-curve-272318/zones/us-central1-a/clusters?alt=json returned "Insufficient regional quota to satisfy request: resource "IN_USE_ADDRESSES": request requires '12.0' and is short '4.0'. project has a quota of '8.0' with '8.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=fifth-curve-272318.">
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.7/site-packages/caliban-0.3.0+8.gaf9dd99.dirty-py3.7.egg/caliban/platform/gke/util.py", line 65, in wrapper
    response = fn(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/caliban-0.3.0+8.gaf9dd99.dirty-py3.7.egg/caliban/platform/gke/cluster.py", line 1178, in create
    rsp = request.execute()
  File "/opt/anaconda3/lib/python3.7/site-packages/google_api_python_client-1.10.0-py3.7.egg/googleapiclient/_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.7/site-packages/google_api_python_client-1.10.0-py3.7.egg/googleapiclient/http.py", line 907, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://container.googleapis.com/v1beta1/projects/fifth-curve-272318/zones/us-central1-a/clusters?alt=json returned "Insufficient regional quota to satisfy request: resource "IN_USE_ADDRESSES": request requires '12.0' and is short '4.0'. project has a quota of '8.0' with '8.0' available. View and manage quotas at https://console.cloud.google.com/iam-admin/quotas?usage=USED&project=fifth-curve-272318.">

Free trial accounts cannot update their quota. Is there a way to request fewer IP addresses?

ajslone commented 4 years ago

Erik, one thing you can do (and I probably should change the default setting for this), is when you create the cluster, you can use the --single_zone flag, which will reduce the number of instances required to run the cluster. Hopefully this should get you past that IP address limit.

eschnett commented 4 years ago

This works! Thank you.