cephfs: unset cluster Name metadata

unsets the cluster name metadata key and value on the subvolume

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever 2022-06-14 18:56:46 +05:30 committed by mergify[bot]
parent 21d811096b
commit 11d51ed9b0

View File

@ -78,5 +78,11 @@ func (s *subVolumeClient) UnsetAllMetadata(keys []string) error {
}
}
err := s.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 subvolume %v: %w", clusterNameKey, s, err)
}
return nil
}