mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +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 == "" {
|
if volID == "" {
|
||||||
return nil, nil, status.Errorf(codes.NotFound, "volume ID cannot be empty")
|
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, req.GetSecrets())
|
||||||
rbdvol, err := genVolFromVolID(ctx, volID, cr, nil)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.ErrorLog(ctx, "failed to get backend image for %s: %v", volID, err)
|
util.ErrorLog(ctx, "failed to get backend image for %s: %v", volID, err)
|
||||||
if !errors.Is(err, ErrImageNotFound) {
|
if !errors.Is(err, ErrImageNotFound) {
|
||||||
|
Loading…
Reference in New Issue
Block a user