@@ -863,13 +863,14 @@ func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequ
863
863
return nil , status .Error (codes .InvalidArgument , "CreateSnapshot Source Volume ID must be provided" )
864
864
}
865
865
866
- rgName , accountName , fileShareName , _ , _ , subsID , err := GetFileShareInfo (sourceVolumeID ) //nolint:dogsled
866
+ rgName , accountName , fileShareName , _ , _ , srcVolSubsID , err := GetFileShareInfo (sourceVolumeID ) //nolint:dogsled
867
867
if err != nil {
868
868
return nil , status .Error (codes .Internal , fmt .Sprintf ("GetFileShareInfo(%s) failed with error: %v" , sourceVolumeID , err ))
869
869
}
870
870
if rgName == "" {
871
871
rgName = d .cloud .ResourceGroup
872
872
}
873
+ subsID := srcVolSubsID
873
874
if subsID == "" {
874
875
subsID = d .cloud .SubscriptionID
875
876
}
@@ -902,7 +903,7 @@ func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequ
902
903
return & csi.CreateSnapshotResponse {
903
904
Snapshot : & csi.Snapshot {
904
905
SizeBytes : volumehelper .GiBToBytes (int64 (itemSnapshotQuota )),
905
- SnapshotId : sourceVolumeID + "#" + itemSnapshot ,
906
+ SnapshotId : getSnapshotID ( srcVolSubsID , sourceVolumeID , itemSnapshot , subsID ) ,
906
907
SourceVolumeId : sourceVolumeID ,
907
908
CreationTime : timestamppb .New (itemSnapshotTime ),
908
909
// Since the snapshot of azurefile has no field of ReadyToUse, here ReadyToUse is always set to true.
@@ -965,10 +966,11 @@ func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequ
965
966
d .getFileShareSizeCache .Set (key , itemSnapshotQuota )
966
967
}
967
968
}
969
+
968
970
createResp := & csi.CreateSnapshotResponse {
969
971
Snapshot : & csi.Snapshot {
970
972
SizeBytes : volumehelper .GiBToBytes (int64 (itemSnapshotQuota )),
971
- SnapshotId : sourceVolumeID + "#" + itemSnapshot ,
973
+ SnapshotId : getSnapshotID ( srcVolSubsID , sourceVolumeID , itemSnapshot , subsID ) ,
972
974
SourceVolumeId : sourceVolumeID ,
973
975
CreationTime : timestamppb .New (itemSnapshotTime ),
974
976
// Since the snapshot of azurefile has no field of ReadyToUse, here ReadyToUse is always set to true.
0 commit comments