Address review comments

This commit is contained in:
Michelle Au 2017-05-26 11:48:31 -07:00
parent 5fcb82dde9
commit f385dfcb3b
3 changed files with 5 additions and 5 deletions

View File

@ -216,6 +216,7 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *types.UnixGroupID) err
glog.V(4).Infof("attempting to mount %s", dir) glog.V(4).Infof("attempting to mount %s", dir)
err = m.mounter.Mount(m.globalPath, dir, "", options) err = m.mounter.Mount(m.globalPath, dir, "", options)
if err != nil { if err != nil {
glog.Errorf("Mount of volume %s failed: %v", dir, err)
notMnt, mntErr := m.mounter.IsLikelyNotMountPoint(dir) notMnt, mntErr := m.mounter.IsLikelyNotMountPoint(dir)
if mntErr != nil { if mntErr != nil {
glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr) glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
@ -226,7 +227,7 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *types.UnixGroupID) err
glog.Errorf("Failed to unmount: %v", mntErr) glog.Errorf("Failed to unmount: %v", mntErr)
return err return err
} }
notMnt, mntErr := m.mounter.IsLikelyNotMountPoint(dir) notMnt, mntErr = m.mounter.IsLikelyNotMountPoint(dir)
if mntErr != nil { if mntErr != nil {
glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr) glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
return err return err
@ -238,7 +239,6 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *types.UnixGroupID) err
} }
} }
os.Remove(dir) os.Remove(dir)
glog.Errorf("Mount of volume %s failed: %v", dir, err)
return err return err
} }

View File

@ -76,7 +76,7 @@ type VolumeTestConfig struct {
ServerImage string ServerImage string
// Ports to export from the server pod. TCP only. // Ports to export from the server pod. TCP only.
ServerPorts []int ServerPorts []int
// Commands to run in the comtainer image. // Commands to run in the container image.
ServerCmds []string ServerCmds []string
// Arguments to pass to the container image. // Arguments to pass to the container image.
ServerArgs []string ServerArgs []string

View File

@ -165,8 +165,8 @@ func cleanupLocalVolume(config *localTestConfig, volume *localTestVolume) {
} }
By("Removing the test directory") By("Removing the test directory")
writeCmd := fmt.Sprintf("rm -r %s", volume.containerDir) removeCmd := fmt.Sprintf("rm -r %s", volume.containerDir)
runLocalUtil(config, volume.node.Name, writeCmd) runLocalUtil(config, volume.node.Name, removeCmd)
} }
func runLocalUtil(config *localTestConfig, nodeName, cmd string) { func runLocalUtil(config *localTestConfig, nodeName, cmd string) {