Skip to content

Commit be025c0

Browse files
committed
remove existing disk isDiskReady check
1 parent 183bb8e commit be025c0

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

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

+7-8
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.Cre
175175
return nil, status.Error(codes.AlreadyExists, fmt.Sprintf("CreateVolume disk already exists with same name and is incompatible: %v", err))
176176
}
177177

178-
ready, err := isDiskReady(existingDisk)
179-
if err != nil {
180-
return nil, status.Error(codes.Internal, fmt.Sprintf("CreateVolume disk %v had error checking ready status: %v", volKey, err))
181-
}
178+
// ready, err := isDiskReady(existingDisk)
179+
// if err != nil {
180+
// return nil, status.Error(codes.Internal, fmt.Sprintf("CreateVolume disk %v had error checking ready status: %v", volKey, err))
181+
// }
182182

183-
if !ready {
184-
return nil, status.Error(codes.Internal, fmt.Sprintf("CreateVolume existing disk %v is not ready. The existing disk %v has status %v. ", volKey, existingDisk, existingDisk.GetStatus()))
185-
}
183+
// if !ready {
184+
// return nil, status.Error(codes.Internal, fmt.Sprintf("CreateVolume existing disk %v is not ready. The existing disk %v has status %v. ", volKey, existingDisk, existingDisk.GetStatus()))
185+
// }
186186

187187
// If there is no validation error, immediately return success
188188
klog.V(4).Infof("CreateVolume succeeded for disk %v, it already exists and was compatible", volKey)
@@ -1096,7 +1096,6 @@ func generateCreateVolumeResponse(disk *gce.CloudDisk, zones []string) *csi.Crea
10961096
},
10971097
}
10981098
}
1099-
diskID := disk.GetDiskId()
11001099
if diskID != "" {
11011100
contentSource = &csi.VolumeContentSource{
11021101
Type: &csi.VolumeContentSource_Volume{

0 commit comments

Comments
 (0)