mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +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>
(cherry picked from commit 019628c8c2
)
This commit is contained in:
parent
1f1a212ece
commit
787d54fa6a
@ -622,7 +622,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