Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cloud/gcp/actuators/machine/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
29 changes: 29 additions & 0 deletions pkg/cloud/gcp/actuators/machine/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down