From 65818d01360534fa7fab3c23ef040c2af42323cb Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 9 Jan 2020 17:22:19 +0530 Subject: [PATCH] Add ContentSource to the CreateVolume response if PVC is created from a snapshot, external-provisioner expects the volume ContentSource to be set in Create VolumeResponse Signed-off-by: Madhu Rajanna (cherry picked from commit a4f6a3407f78492277bf233d03cc81fc2a8b361f) --- pkg/rbd/controllerserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/rbd/controllerserver.go b/pkg/rbd/controllerserver.go index 169ac2a3f..551f1c50c 100644 --- a/pkg/rbd/controllerserver.go +++ b/pkg/rbd/controllerserver.go @@ -151,6 +151,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol VolumeId: rbdVol.VolID, CapacityBytes: rbdVol.VolSize, VolumeContext: req.GetParameters(), + ContentSource: req.GetVolumeContentSource(), }, }, nil } @@ -178,6 +179,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol VolumeId: rbdVol.VolID, CapacityBytes: rbdVol.VolSize, VolumeContext: req.GetParameters(), + ContentSource: req.GetVolumeContentSource(), }, }, nil }