mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
fix incorrect log
This commit is contained in:
parent
38e3351312
commit
9c3b2a00ac
@ -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")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user