Skip to content

Commit c6619a0

Browse files
committed
Update error message for disk compatibility with machine family
1 parent 0687920 commit c6619a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/gce-pd-csi-driver/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func (gceCS *GCEControllerServer) executeControllerPublishVolume(ctx context.Con
597597
// If we encountered an UnsupportedDiskError, rewrite the error message to be more user friendly.
598598
// The error message from GCE is phrased around disk create on VM creation, not runtime attach.
599599
machineFamily := parseMachineFamily(instance.MachineType)
600-
return nil, status.Errorf(codes.Internal, "'%s' is not a compatible disk type with the machine family '%s', please review the GKE online documentation for available persistent disk options", udErr.DiskType, machineFamily)
600+
return nil, status.Errorf(codes.InvalidArgument, "'%s' is not a compatible disk type with the machine family '%s', please review the GCP online documentation for available persistent disk options", udErr.DiskType, machineFamily)
601601
}
602602
return nil, status.Errorf(codes.Internal, "unknown Attach error: %v", err.Error())
603603
}

0 commit comments

Comments
 (0)