Add logging to volume tear-down to help understand mount behaviour

This commit is contained in:
Justin Santa Barbara
2015-05-25 08:13:30 -04:00
parent 9184ccf24d
commit 9839253233
2 changed files with 14 additions and 3 deletions

View File

@@ -289,6 +289,9 @@ func (pd *awsElasticBlockStore) TearDownAt(dir string) error {
glog.V(2).Info("Error getting mountrefs for ", dir, ": ", err)
return err
}
if len(refs) == 0 {
glog.Warning("Did not find pod-mount for ", dir, " during tear-down")
}
// Unmount the bind-mount inside this pod
if err := pd.mounter.Unmount(dir); err != nil {
glog.V(2).Info("Error unmounting dir ", dir, ": ", err)
@@ -307,6 +310,8 @@ func (pd *awsElasticBlockStore) TearDownAt(dir string) error {
glog.V(2).Info("Error detaching disk ", pd.volumeID, ": ", err)
return err
}
} else {
glog.V(2).Infof("Found multiple refs; won't detach EBS volume: %v", refs)
}
mountpoint, mntErr := pd.mounter.IsMountPoint(dir)
if mntErr != nil {