diff --git a/pkg/cloud/gcp/actuators/machine/reconciler.go b/pkg/cloud/gcp/actuators/machine/reconciler.go index 0183d473..0c9faffa 100644 --- a/pkg/cloud/gcp/actuators/machine/reconciler.go +++ b/pkg/cloud/gcp/actuators/machine/reconciler.go @@ -141,7 +141,7 @@ func (r *Reconciler) validateGuestAccelerators() error { // machine types that have GPUs included would skip this function. The ultimate result for users it that new GPU // machine types will not have accurate quota reporting. If machines are being pathologically deleted and recreated // it may be a sign of a quota issue. - if len(r.providerSpec.GPUs) == 0 && !strings.HasPrefix(r.providerSpec.MachineType, "a2-") && !strings.HasPrefix(r.providerSpec.MachineType, "a3-") { + if len(r.providerSpec.GPUs) == 0 && !strings.HasPrefix(r.providerSpec.MachineType, "a2-") && !strings.HasPrefix(r.providerSpec.MachineType, "a3-") || strings.HasPrefix(r.providerSpec.MachineType, "a3-ultragpu-") { // no accelerators to validate so return nil return nil } diff --git a/pkg/cloud/gcp/actuators/machine/reconciler_test.go b/pkg/cloud/gcp/actuators/machine/reconciler_test.go index 8946bfa2..2926f2a6 100644 --- a/pkg/cloud/gcp/actuators/machine/reconciler_test.go +++ b/pkg/cloud/gcp/actuators/machine/reconciler_test.go @@ -745,6 +745,35 @@ func TestCreate(t *testing.T) { }, expectedError: errors.New("failed to fetch user-defined tags for : failed to fetch openshift/key2/value2 tag details: googleapi: Error 500: Internal error while fetching 'openshift/key2/value2'"), }, + { + name: "a3-ultragpu (H200 GPUs) instance create succeeds when quota is not available", + providerSpec: &machinev1.GCPMachineProviderSpec{ + Region: "test-region", + Zone: "test-zone", + MachineType: "a3-ultragpu-8g", + Disks: []*machinev1.GCPDisk{ + { + Boot: true, + Image: "projects/fooproject/global/images/uefi-image", + }, + }, + }, + mockGPUCompatibleMachineTypesList: func(project string, zone string, ctx context.Context) (map[string]computeservice.GpuInfo, []string) { + var compatibleMachineType = []string{} + var gpuInfo = map[string]computeservice.GpuInfo{ + "a3-ultragpu-8g": { + Type: "nvidia-h200-141gb", + Count: 1, + }, + } + return gpuInfo, compatibleMachineType + }, + mockRegionGet: func(project string, region string) (*compute.Region, error) { + var computeQuota = &compute.Quota{} + var computeRegion = &compute.Region{Quotas: []*compute.Quota{computeQuota}} + return computeRegion, nil + }, + }, } mockTagService := tagservice.NewMockTagService()