Automatically-generated 0-value compute quotas

I’ve noticed some strange behavior recently when attempting to insert VMs that I’m trying to understand. Google Cloud seems to be automatically adding quotas with a value of 0. Here is the sequence of operations:

  1. Check existing quotas. Find a machine type family and region combination that doesn’t have an existing quota (I.e. N4 vm_family and us-west4 region).
  2. Attempt to insert a new VM via the API using that machine type family and region (I.e. n4-highcpu-4 and zone us-west4-a).
  3. Inserting the VM fails with error Quota ‘CPUS_PER_VM_FAMILY’ exceeded. Limit: 0.0 in region us-west4.
  4. Check quotas again. There is now a new quota for region us-west4 and vm_family N4 with a value of 0.

I’ve tried several different regions and several different machine type families and hit this same issue many times. I can’t be sure I’ve hit it every time, but at least most of the time.

I don’t actually care about getting this working for my own account. My problem is that I maintain an application that provisions VMs into Google Cloud which sometimes includes automatically picking a machine type. I don’t want my application to fail because it chose a machine type and Google Cloud auto-created a 0 quota for it. I understand that we can tell the customer to go through the process of increasing the quota but I would prefer to avoid that.

The documentation that I have read seems to indicate that Google Cloud doesn’t automatically create quotas so either this is a bug in Google Cloud, the documentation is wrong, or what I am seeing isn’t actually automatically created quotas.

Hey @jwrackware,

I’d like to dig into this one. What type of API response are you getting in your step 1?

And can you link the documentation you are referring to?

-Andrew

Hi @Andrew_B,

Thanks for responding. My step 1 was done manually in the Google Cloud console. I just started looking at quotas the last few days and still haven’t been able to correlate the API quota data with the console quota data reliably so I’m relying on the console for now. Here are the quotas that shows up after the attempt to insert the VM:

image

and

image

I may have been wrong about the documentation. I thought I saw something in the actual Google documentation, but I can’t find it now. The only thing I can find now is a Google Search AI response that starts with

Google Cloud doesn’t offer fully “automatic quota adjustments” for all resources; however, it provides tools and features to help manage them.

I do see the following document that describes how to create an automatic quota adjuster which I know is not enabled in my project.

FYI, I can get the quota data from the API if that would be helpful. There’s just a lot of data and I don’t always know which parts are relevant.

Also, I’m happy to be proven wrong about automatic quotas since it seems I probably didn’t see that in the documentation. If there is documentation showing that automatic quota adjustments do happen and why, I’d be interested to see that documentation. My own search for anything along those lines hasn’t turned up anything.

The quota limit of 0 for the specific combination (e.g., N4 VM family in us-west4) likely isn’t being created when you make the first VM insertion attempt. It was always 0, but the system did not pre-populate the Quotas page with every possible quota limit for every resource, region, and dimension.

Said another way, the quota wasn’t created by the failed attempt; the attempt simply made the existing 0 limit visible.

This does appear to be a bug in the Console UI, so I will report this. Appreciate you highlighting this.

Perfect, that makes sense.

So my next question would be, how can I determine beforehand if the quota is actually 0? I see some system limits for regions (but not vm_family) set to 0. For example:

image

But then I also see System Limits for vm_family with non-zero values:

image

Also, I see one for the zone and vm_family:

image

So, is there a document somewhere that explains how the quotas and system limits are applied so that I can take the quota data and make a determination of whether the limit is actually 0?Obviously the available quota is affected by other tenancy’s usage of a given machine type in the same region and the availability of physical hardware resources. However, assuming there are still resources available in the region/zone, is there a way to figure out what the “effective” quota would be?