Check volume node affinity before mount

This commit is contained in:
Michelle Au
2017-05-12 00:16:21 -07:00
parent 6ade5461ad
commit 06f25b03eb
6 changed files with 208 additions and 0 deletions

View File

@@ -241,6 +241,7 @@ type VolumeHost interface {
type VolumePluginMgr struct {
mutex sync.Mutex
plugins map[string]VolumePlugin
Host VolumeHost
}
// Spec is an internal representation of a volume. All API volume types translate to Spec.
@@ -339,6 +340,7 @@ func (pm *VolumePluginMgr) InitPlugins(plugins []VolumePlugin, host VolumeHost)
pm.mutex.Lock()
defer pm.mutex.Unlock()
pm.Host = host
if pm.plugins == nil {
pm.plugins = map[string]VolumePlugin{}
}