mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53: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>
(cherry picked from commit d12400aa9c
)
This commit is contained in:
committed by
mergify[bot]
parent
72e67d7da5
commit
90d76e9c8a
@ -2091,10 +2091,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