ScaleIO: use a fresh mounter for every SetUp/TearDown

A volume plugin should not cache Mounter for a long time, it can get a
different one with each SetUp/TearDown call.
This commit is contained in:
Jan Safranek
2017-08-22 13:25:09 +02:00
parent 07dea6b447
commit dbaf41e92a
3 changed files with 6 additions and 10 deletions

View File

@@ -23,7 +23,6 @@ import (
api "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/pkg/util/keymutex"
"k8s.io/kubernetes/pkg/util/mount"
"k8s.io/kubernetes/pkg/volume"
)
@@ -35,7 +34,6 @@ const (
type sioPlugin struct {
host volume.VolumeHost
mounter mount.Interface
volumeMtx keymutex.KeyMutex
}
@@ -53,7 +51,6 @@ var _ volume.VolumePlugin = &sioPlugin{}
func (p *sioPlugin) Init(host volume.VolumeHost) error {
p.host = host
p.mounter = host.GetMounter(p.GetPluginName())
p.volumeMtx = keymutex.NewKeyMutex()
return nil
}