From 18aef8a073e44b987eb1d7813f51bf8e65644fd6 Mon Sep 17 00:00:00 2001 From: Claudio Busse Date: Sat, 22 Nov 2025 16:29:54 +0100 Subject: [PATCH] feat: add GCP CPUS_ALL_REGIONS quota error --- config/configmaps/install-log-regexes-configmap.yaml | 7 ++++++- pkg/controller/clusterprovision/installlogmonitor_test.go | 6 ++++++ pkg/operator/assets/bindata.go | 7 ++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/config/configmaps/install-log-regexes-configmap.yaml b/config/configmaps/install-log-regexes-configmap.yaml index 19a388cf9af..decec3d9a6b 100644 --- a/config/configmaps/install-log-regexes-configmap.yaml +++ b/config/configmaps/install-log-regexes-configmap.yaml @@ -238,9 +238,14 @@ data: installFailingMessage: GCP Precondition Failed - name: GCPQuotaSSDTotalGBExceeded searchRegexStrings: - - "Quota \'SSD_TOTAL_GB\' exceeded" + - "Quota 'SSD_TOTAL_GB' exceeded" installFailingReason: GCPQuotaSSDTotalGBExceeded installFailingMessage: GCP quota SSD_TOTAL_GB exceeded + - name: GCPQuotaCPUSAllRegionsExceeded + searchRegexStrings: + - "Quota 'CPUS_ALL_REGIONS' exceeded" + installFailingReason: GCPQuotaCPUSAllRegionsExceeded + installFailingMessage: GCP quota CPUS_ALL_REGIONS exceeded - name: GCPComputeQuota searchRegexStrings: - "compute\\.googleapis\\.com/cpus is not available in [a-z0-9-]* because the required number of resources \\([0-9]*\\) is more than" diff --git a/pkg/controller/clusterprovision/installlogmonitor_test.go b/pkg/controller/clusterprovision/installlogmonitor_test.go index c5e7dcf6261..484714ba921 100644 --- a/pkg/controller/clusterprovision/installlogmonitor_test.go +++ b/pkg/controller/clusterprovision/installlogmonitor_test.go @@ -28,6 +28,7 @@ const ( gcpInvalidProjectIDLog = "blahblah\ntime=\"2020-11-13T16:05:07Z\" level=fatal msg=\"failed to fetch Master Machines: failed to load asset \"Install Config\": platform.gcp.project: Invalid value: \"o-6b20f250\": invalid project ID\nblahblah" gcpSSDQuotaLog = "blahblah\ntime=\"2021-01-06T03:35:44Z\" level=error msg=\"Error: Error waiting for instance to create: Quota 'SSD_TOTAL_GB' exceeded. Limit: 500.0 in region asia-northeast2.\nblahblah" gcpCPUQuotaLog = "level=fatal msg=failed to fetch Cluster: failed to fetch dependency of \"Cluster\": failed to generate asset \"Platform Quota Check\": error(MissingQuota): compute.googleapis.com/cpus is not available in us-east1 because the required number of resources (20) is more than remaining quota of 16" + gcpCPUSAllRegionsQuotaLog = "\"Error creating an instance\" err=\"googleapi: Error 403: QUOTA_EXCEEDED - Quota 'CPUS_ALL_REGIONS' exceeded. Limit: 20.0 globally.\"" gcpServiceAccountQuotaLog = "level=fatal msg=failed to fetch Cluster: failed to fetch dependency of \"Cluster\": failed to generate asset \"Platform Quota Check\": error(MissingQuota): iam.googleapis.com/quota/service-account-count is not available in global because the required number of resources (5) is more than remaining quota of 0" kubeAPIWaitTimeoutLog = "blahblah\ntime=\"2021-01-03T07:04:44Z\" level=fatal msg=\"waiting for Kubernetes API: context deadline exceeded\"" natGatewayLimitExceeded = "blahblah\ntime=\"2021-01-06T03:35:44Z\" level=error msg=\"Error creating NAT Gateway: NatGatewayLimitExceeded: The maximum number of NAT Gateways has been reached.\"" @@ -372,6 +373,11 @@ func TestParseInstallLog(t *testing.T) { log: ptr.To(gcpCPUQuotaLog), expectedReason: "GCPComputeQuotaExceeded", }, + { + name: "GCP CPUS_ALL_REGIONS quota", + log: ptr.To(string(gcpCPUSAllRegionsQuotaLog)), + expectedReason: "GCPQuotaCPUSAllRegionsExceeded", + }, { name: "GCP service account quota", log: ptr.To(gcpServiceAccountQuotaLog), diff --git a/pkg/operator/assets/bindata.go b/pkg/operator/assets/bindata.go index 1ca7b17e764..90f2dd73291 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -1890,9 +1890,14 @@ data: installFailingMessage: GCP Precondition Failed - name: GCPQuotaSSDTotalGBExceeded searchRegexStrings: - - "Quota \'SSD_TOTAL_GB\' exceeded" + - "Quota 'SSD_TOTAL_GB' exceeded" installFailingReason: GCPQuotaSSDTotalGBExceeded installFailingMessage: GCP quota SSD_TOTAL_GB exceeded + - name: GCPQuotaCPUSAllRegionsExceeded + searchRegexStrings: + - "Quota 'CPUS_ALL_REGIONS' exceeded" + installFailingReason: GCPQuotaCPUSAllRegionsExceeded + installFailingMessage: GCP quota CPUS_ALL_REGIONS exceeded - name: GCPComputeQuota searchRegexStrings: - "compute\\.googleapis\\.com/cpus is not available in [a-z0-9-]* because the required number of resources \\([0-9]*\\) is more than"