mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: unset metadata if setmetadata is false
We need to unset the metadata on the clone and restore PVC if the parent PVC was created when setmetadata was set to true and it was set to false when restore and clone pvc was created. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
ad36f13e92
commit
d12400aa9c
@ -2122,10 +2122,6 @@ func (rv *rbdVolume) setAllMetadata(parameters map[string]string) error {
|
||||
|
||||
// unsetAllMetadata unset all the metadata from arg keys on RBD image.
|
||||
func (rv *rbdVolume) unsetAllMetadata(keys []string) error {
|
||||
if !rv.EnableMetadata {
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, key := range keys {
|
||||
err := rv.RemoveMetadata(key)
|
||||
// TODO: replace string comparison with errno.
|
||||
|
Reference in New Issue
Block a user