mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
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:
parent
21d811096b
commit
11d51ed9b0
@ -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
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user