mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
rbd: update namespace name in metadata
If a PV is reattached to a new PVC in a different namespace we need to update the namespace name in the rbd image metadata. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
f19805a40b
commit
019628c8c2
@ -626,7 +626,7 @@ func RegenerateJournal(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Update Metadata on reattach of the same old PV
|
// Update Metadata on reattach of the same old PV
|
||||||
parameters := k8s.PrepareVolumeMetadata(claimName, rbdVol.Owner, "")
|
parameters := k8s.PrepareVolumeMetadata(claimName, owner, "")
|
||||||
err = rbdVol.setAllMetadata(parameters)
|
err = rbdVol.setAllMetadata(parameters)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to set volume metadata: %w", err)
|
return "", fmt.Errorf("failed to set volume metadata: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user