mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
rbd: pass secrets when creating an source rbdVolume for cloning
Without this, the rbdVolume can not connect to the Ceph cluster and configure the (optional) encryption. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
92b2e08adf
commit
b6aa19eea5
@ -559,8 +559,7 @@ func checkContentSource(ctx context.Context, req *csi.CreateVolumeRequest, cr *u
|
||||
if volID == "" {
|
||||
return nil, nil, status.Errorf(codes.NotFound, "volume ID cannot be empty")
|
||||
}
|
||||
// TODO need to support cloning for encrypted volume
|
||||
rbdvol, err := genVolFromVolID(ctx, volID, cr, nil)
|
||||
rbdvol, err := genVolFromVolID(ctx, volID, cr, req.GetSecrets())
|
||||
if err != nil {
|
||||
util.ErrorLog(ctx, "failed to get backend image for %s: %v", volID, err)
|
||||
if !errors.Is(err, ErrImageNotFound) {
|
||||
|
Loading…
Reference in New Issue
Block a user