File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -417,10 +417,7 @@ func (cs *controllerServer) createVolFromContentSource(
417
417
req * csi.CreateVolumeRequest ,
418
418
destVolOptions * volumeOptions ,
419
419
curveVol * curveservice.CurveVolume ) (volSource string , err error ) {
420
- if cs .snapshotServer == "" {
421
- return "" , status .Error (codes .Unimplemented , "" )
422
- }
423
-
420
+
424
421
if req .VolumeContentSource == nil {
425
422
return "" , nil
426
423
}
@@ -429,6 +426,10 @@ func (cs *controllerServer) createVolFromContentSource(
429
426
// check contentSource
430
427
switch req .VolumeContentSource .Type .(type ) {
431
428
case * csi.VolumeContentSource_Snapshot :
429
+ if cs .snapshotServer == "" {
430
+ return "" , status .Error (codes .Unimplemented , "" )
431
+ }
432
+
432
433
snapshotId := req .VolumeContentSource .GetSnapshot ().GetSnapshotId ()
433
434
// lock out parallel snapshot
434
435
if acquired := cs .snapshotLocks .TryAcquire (snapshotId ); ! acquired {
You can’t perform that action at this time.
0 commit comments