From 062853d1d47835c0ea6b4e849c4b123b0d76b16b Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Mon, 31 Oct 2016 17:59:45 -0700 Subject: [PATCH] prevent plugin when volume plugin is disabled Signed-off-by: Victor Vieux Upstream-commit: 34f4b197b8cec5b177797e343a5c89473ff1d2aa Component: engine --- components/engine/plugin/store/store.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/engine/plugin/store/store.go b/components/engine/plugin/store/store.go index e1e41f38af..b2cec91afe 100644 --- a/components/engine/plugin/store/store.go +++ b/components/engine/plugin/store/store.go @@ -79,8 +79,10 @@ func (ps *Store) getAllByCap(capability string) []plugingetter.CompatPlugin { result := make([]plugingetter.CompatPlugin, 0, 1) for _, p := range ps.plugins { - if _, err := p.FilterByCap(capability); err == nil { - result = append(result, p) + if p.IsEnabled() { + if _, err := p.FilterByCap(capability); err == nil { + result = append(result, p) + } } } return result