mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
discard umount error if directory is not mounted
if the directory is not mounted return nil
during umount of mountPoint
Discard error if error is os.IsNotExist
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit dcafdb519e
)
This commit is contained in:
committed by
mergify[bot]
parent
7912ec0040
commit
eddfc123e5
@ -155,7 +155,7 @@ func (nc *NodeCache) Delete(identifier string) error {
|
||||
file := path.Join(nc.BasePath, nc.CacheDir, identifier+".json")
|
||||
err := os.Remove(file)
|
||||
if err != nil {
|
||||
if err == os.ErrNotExist {
|
||||
if os.IsNotExist(err) {
|
||||
klog.V(4).Infof("node-cache: cannot delete missing metadata storage file %s, assuming it's already deleted", file)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user