Skip to content

Commit

Permalink
Add debug logs to mounter.Unmount for ErrNoEnt case. (#1362)
Browse files Browse the repository at this point in the history
- Trying to debug a bug where mounter is reporting a device is not mounted
  but the device and mountpoint actually exist.

Signed-off-by: Aditya Dani <aditya@portworx.com>
  • Loading branch information
adityadani committed Jan 6, 2020
1 parent 54df088 commit a030e79
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,17 @@ func (m *Mounter) Unmount(
m.Unlock()
logrus.Warnf("Unable to unmount device %q path %q: %v",
devPath, path, ErrEnoent.Error())
logrus.Infof("Found %v mounts in mounter's cache: ", len(m.mounts))
logrus.Infof("Mounter has the following mountpoints: ")
for dev, info := range m.mounts {
logrus.Infof("For Device %v: Info: %v", dev, info)
if info == nil {
continue
}
for _, path := range info.Mountpoint {
logrus.Infof("\t Mountpath: %v Rootpath: %v", path.Path, path.Root)
}
}
return ErrEnoent
}
m.Unlock()
Expand Down

0 comments on commit a030e79

Please sign in to comment.