mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
rbd: unset cluster Name metadata
unsets the cluster name metadata key and value on the RBD image Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
parent
2880c25fd6
commit
09a8e5e9e6
@ -2028,5 +2028,11 @@ func (rv *rbdVolume) unsetAllMetadata(keys []string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err := rv.RemoveMetadata(clusterNameKey)
|
||||||
|
// TODO: replace string comparison with errno.
|
||||||
|
if err != nil && !strings.Contains(err.Error(), "No such file or directory") {
|
||||||
|
return fmt.Errorf("failed to unset metadata key %q on %q: %w", clusterNameKey, rv, err)
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user