From f385dfcb3bd4966bb3b1cc4ea3f254aea861a8e5 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 26 May 2017 11:48:31 -0700 Subject: [PATCH] Address review comments --- pkg/volume/local/local.go | 4 ++-- test/e2e/framework/volume_util.go | 2 +- test/e2e/storage/persistent_volumes-local.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/volume/local/local.go b/pkg/volume/local/local.go index aeee2339e56..9e485c52b34 100644 --- a/pkg/volume/local/local.go +++ b/pkg/volume/local/local.go @@ -216,6 +216,7 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *types.UnixGroupID) err glog.V(4).Infof("attempting to mount %s", dir) err = m.mounter.Mount(m.globalPath, dir, "", options) if err != nil { + glog.Errorf("Mount of volume %s failed: %v", dir, err) notMnt, mntErr := m.mounter.IsLikelyNotMountPoint(dir) if mntErr != nil { 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) return err } - notMnt, mntErr := m.mounter.IsLikelyNotMountPoint(dir) + notMnt, mntErr = m.mounter.IsLikelyNotMountPoint(dir) if mntErr != nil { glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr) return err @@ -238,7 +239,6 @@ func (m *localVolumeMounter) SetUpAt(dir string, fsGroup *types.UnixGroupID) err } } os.Remove(dir) - glog.Errorf("Mount of volume %s failed: %v", dir, err) return err } diff --git a/test/e2e/framework/volume_util.go b/test/e2e/framework/volume_util.go index 08ce0b49ada..718a84ad2e0 100644 --- a/test/e2e/framework/volume_util.go +++ b/test/e2e/framework/volume_util.go @@ -76,7 +76,7 @@ type VolumeTestConfig struct { ServerImage string // Ports to export from the server pod. TCP only. ServerPorts []int - // Commands to run in the comtainer image. + // Commands to run in the container image. ServerCmds []string // Arguments to pass to the container image. ServerArgs []string diff --git a/test/e2e/storage/persistent_volumes-local.go b/test/e2e/storage/persistent_volumes-local.go index 734e7e07205..0097d96b701 100644 --- a/test/e2e/storage/persistent_volumes-local.go +++ b/test/e2e/storage/persistent_volumes-local.go @@ -165,8 +165,8 @@ func cleanupLocalVolume(config *localTestConfig, volume *localTestVolume) { } By("Removing the test directory") - writeCmd := fmt.Sprintf("rm -r %s", volume.containerDir) - runLocalUtil(config, volume.node.Name, writeCmd) + removeCmd := fmt.Sprintf("rm -r %s", volume.containerDir) + runLocalUtil(config, volume.node.Name, removeCmd) } func runLocalUtil(config *localTestConfig, nodeName, cmd string) {