mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: update PV/PVC metadata on a reattach of PV
Example if a PVC was delete by setting `persistentVolumeReclaimPolicy` as `Retain` on PV, and PV is reattached to a new PVC, we make sure to update PV/PVC image metadata on a PV reattach. Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
0119d69ab2
commit
ae5925f04c
@ -177,7 +177,13 @@ func (r ReconcilePersistentVolume) reconcilePV(ctx context.Context, obj runtime.
|
||||
}
|
||||
defer cr.DeleteCredentials()
|
||||
|
||||
rbdVolID, err := rbd.RegenerateJournal(pv.Spec.CSI.VolumeAttributes, volumeHandler, requestName, pvcNamespace, cr)
|
||||
rbdVolID, err := rbd.RegenerateJournal(
|
||||
pv.Spec.CSI.VolumeAttributes,
|
||||
pv.Spec.ClaimRef.Name,
|
||||
volumeHandler,
|
||||
requestName,
|
||||
pvcNamespace,
|
||||
cr)
|
||||
if err != nil {
|
||||
log.ErrorLogMsg("failed to regenerate journal %s", err)
|
||||
|
||||
|
Reference in New Issue
Block a user