From a4f6a3407f78492277bf233d03cc81fc2a8b361f 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 --- pkg/rbd/controllerserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/rbd/controllerserver.go b/pkg/rbd/controllerserver.go index 8a81e7078..0c0d8fedb 100644 --- a/pkg/rbd/controllerserver.go +++ b/pkg/rbd/controllerserver.go @@ -162,6 +162,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol VolumeId: rbdVol.VolID, CapacityBytes: rbdVol.VolSize, VolumeContext: req.GetParameters(), + ContentSource: req.GetVolumeContentSource(), }, }, nil } @@ -203,6 +204,7 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol VolumeId: rbdVol.VolID, CapacityBytes: rbdVol.VolSize, VolumeContext: req.GetParameters(), + ContentSource: req.GetVolumeContentSource(), }, }, nil }