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
This commit is contained in:
		| @@ -269,21 +269,21 @@ func (c *csiMountMgr) TearDownAt(dir string) error { | |||||||
|  |  | ||||||
| 	// TODO make all assertion calls private within the client itself | 	// TODO make all assertion calls private within the client itself | ||||||
| 	if err := csi.AssertSupportedVersion(ctx, csiVersion); err != nil { | 	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 | 		return err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if err := csi.NodeUnpublishVolume(ctx, volID, dir); err != nil { | 	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 | 		return err | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	// clean mount point dir | 	// clean mount point dir | ||||||
| 	if err := removeMountDir(c.plugin, dir); err != nil { | 	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 | 		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 | 	return nil | ||||||
| } | } | ||||||
|   | |||||||
| @@ -230,11 +230,11 @@ func TestPluginNewUnmounter(t *testing.T) { | |||||||
| 	csiUnmounter := unmounter.(*csiMountMgr) | 	csiUnmounter := unmounter.(*csiMountMgr) | ||||||
|  |  | ||||||
| 	if err != nil { | 	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 { | 	if csiUnmounter == nil { | ||||||
| 		t.Fatal("failed to create CSI mounter") | 		t.Fatal("failed to create CSI Unmounter") | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if csiUnmounter.podUID != testPodUID { | 	if csiUnmounter.podUID != testPodUID { | ||||||
| @@ -305,6 +305,6 @@ func TestPluginNewDetacher(t *testing.T) { | |||||||
| 		t.Error("plugin not set for detacher") | 		t.Error("plugin not set for detacher") | ||||||
| 	} | 	} | ||||||
| 	if csiDetacher.k8s == nil { | 	if csiDetacher.k8s == nil { | ||||||
| 		t.Error("Kubernetes client not set for attacher") | 		t.Error("Kubernetes client not set for detacher") | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Submit Queue
					Kubernetes Submit Queue