Merge pull request #57123 from linyouchong/linyouchong-20171213

Automatic merge from submit-queue (batch tested with PRs 57148, 57123, 57091, 57141, 57131). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix incorrect log in csi_plugin

What this PR does / why we need it:
fix incorrect log in csi_plugin_test.go and csi_mounter.go

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
NONE

Special notes for your reviewer:
NONE

Release note:
NONE
pull/6/head
Kubernetes Submit Queue 2017-12-16 21:00:44 -08:00 committed by GitHub
commit 5669c4c8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -269,21 +269,21 @@ func (c *csiMountMgr) TearDownAt(dir string) error {
// TODO make all assertion calls private within the client itself
if err := csi.AssertSupportedVersion(ctx, csiVersion); err != nil {
glog.Errorf(log("mounter.SetUpAt failed to assert version: %v", err))
glog.Errorf(log("mounter.TearDownAt failed to assert version: %v", err))
return err
}
if err := csi.NodeUnpublishVolume(ctx, volID, dir); err != nil {
glog.Errorf(log("mounter.SetUpAt failed: %v", err))
glog.Errorf(log("mounter.TearDownAt failed: %v", err))
return err
}
// clean mount point dir
if err := removeMountDir(c.plugin, dir); err != nil {
glog.Error(log("mounter.SetUpAt failed to clean mount dir [%s]: %v", dir, err))
glog.Error(log("mounter.TearDownAt failed to clean mount dir [%s]: %v", dir, err))
return err
}
glog.V(4).Infof(log("mounte.SetUpAt successfully unmounted dir [%s]", dir))
glog.V(4).Infof(log("mounte.TearDownAt successfully unmounted dir [%s]", dir))
return nil
}

View File

@ -230,11 +230,11 @@ func TestPluginNewUnmounter(t *testing.T) {
csiUnmounter := unmounter.(*csiMountMgr)
if err != nil {
t.Fatalf("Failed to make a new Mounter: %v", err)
t.Fatalf("Failed to make a new Unmounter: %v", err)
}
if csiUnmounter == nil {
t.Fatal("failed to create CSI mounter")
t.Fatal("failed to create CSI Unmounter")
}
if csiUnmounter.podUID != testPodUID {
@ -305,6 +305,6 @@ func TestPluginNewDetacher(t *testing.T) {
t.Error("plugin not set for detacher")
}
if csiDetacher.k8s == nil {
t.Error("Kubernetes client not set for attacher")
t.Error("Kubernetes client not set for detacher")
}
}