Skip to content

Commit bb06b98

Browse files
davewaltermariash
authored andcommitted
Remove mapfs path from CSI plugin
[#159572356](https://www.pivotaltracker.com/story/show/159572356) Signed-off-by: Maria Shaldibina <[email protected]>
1 parent b9cb991 commit bb06b98

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

voldiscoverers/csiplugin_discoverer.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ type csiPluginDiscoverer struct {
2525
csiShim csishim.Csi
2626
osShim osshim.Os
2727
csiMountRootDir string
28-
mapfsPath string
2928
}
3029

31-
func NewCsiPluginDiscoverer(logger lager.Logger, pluginRegistry volman.PluginRegistry, pluginPaths []string, csiMountRootDir string, mapfsPath string) volman.Discoverer {
30+
func NewCsiPluginDiscoverer(logger lager.Logger, pluginRegistry volman.PluginRegistry, pluginPaths []string, csiMountRootDir string) volman.Discoverer {
3231
return &csiPluginDiscoverer{
3332
logger: logger,
3433
pluginRegistry: pluginRegistry,
@@ -38,11 +37,10 @@ func NewCsiPluginDiscoverer(logger lager.Logger, pluginRegistry volman.PluginReg
3837
csiShim: &csishim.CsiShim{},
3938
osShim: &osshim.OsShim{},
4039
csiMountRootDir: csiMountRootDir,
41-
mapfsPath: mapfsPath,
4240
}
4341
}
4442

45-
func NewCsiPluginDiscovererWithShims(logger lager.Logger, pluginRegistry volman.PluginRegistry, pluginPaths []string, filepathShim filepathshim.Filepath, grpcShim grpcshim.Grpc, csiShim csishim.Csi, osShim osshim.Os, csiMountRootDir string, mapfsPath string) volman.Discoverer {
43+
func NewCsiPluginDiscovererWithShims(logger lager.Logger, pluginRegistry volman.PluginRegistry, pluginPaths []string, filepathShim filepathshim.Filepath, grpcShim grpcshim.Grpc, csiShim csishim.Csi, osShim osshim.Os, csiMountRootDir string) volman.Discoverer {
4644
return &csiPluginDiscoverer{
4745
logger: logger,
4846
pluginRegistry: pluginRegistry,
@@ -52,7 +50,6 @@ func NewCsiPluginDiscovererWithShims(logger lager.Logger, pluginRegistry volman.
5250
csiShim: csiShim,
5351
osShim: osShim,
5452
csiMountRootDir: csiMountRootDir,
55-
mapfsPath: mapfsPath,
5653
}
5754
}
5855

@@ -118,7 +115,7 @@ func (p *csiPluginDiscoverer) Discover(logger lager.Logger) (map[string]volman.P
118115
continue
119116
}
120117

121-
plugin := NewCsiPlugin(nodePlugin, pluginSpec, p.grpcShim, p.csiShim, p.osShim, p.csiMountRootDir, oshelper.NewOsHelper(), p.mapfsPath)
118+
plugin := NewCsiPlugin(nodePlugin, pluginSpec, p.grpcShim, p.csiShim, p.osShim, p.csiMountRootDir, oshelper.NewOsHelper())
122119
plugins[csiPluginName] = plugin
123120
} else {
124121
logger.Info("discovered-plugin-ignored", lager.Data{"address": pluginSpec.Address})

voldiscoverers/csiplugin_discoverer_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ var _ = Describe("CSIPluginDiscoverer", func() {
4242
drivers map[string]volman.Plugin
4343
err error
4444
volumesRootDir string
45-
mapfsPath string
4645
)
4746

4847
BeforeEach(func() {
@@ -56,14 +55,13 @@ var _ = Describe("CSIPluginDiscoverer", func() {
5655
fakeIdentityPlugin = &csi_fake.FakeIdentityClient{}
5756
pluginPaths = []string{firstPluginsDirectory}
5857
volumesRootDir = "/var/vcap/data/mounts"
59-
mapfsPath = "/var/vcap/packages/mapfs/bin/mapfs"
6058

6159
logger = lagertest.NewTestLogger("csi-plugin-discoverer-test")
6260
registry = vollocal.NewPluginRegistry()
6361
})
6462

6563
JustBeforeEach(func() {
66-
discoverer = voldiscoverers.NewCsiPluginDiscovererWithShims(logger, registry, pluginPaths, &filepathshim.FilepathShim{}, fakeGrpc, fakeCsi, fakeOs, volumesRootDir, mapfsPath)
64+
discoverer = voldiscoverers.NewCsiPluginDiscovererWithShims(logger, registry, pluginPaths, &filepathshim.FilepathShim{}, fakeGrpc, fakeCsi, fakeOs, volumesRootDir)
6765
})
6866

6967
Describe("#Discover", func() {

vollocal/client_local.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ type DriverConfig struct {
3434
CSIPaths []string
3535
SyncInterval time.Duration
3636
CSIMountRootDir string
37-
MapfsPath string
3837
}
3938

4039
func NewDriverConfig() DriverConfig {
@@ -54,7 +53,7 @@ func NewServer(logger lager.Logger, metronClient loggingclient.IngressClient, co
5453
registry := NewPluginRegistry()
5554

5655
dockerDiscoverer := voldiscoverers.NewDockerDriverDiscoverer(logger, registry, config.DriverPaths)
57-
csiDiscoverer := voldiscoverers.NewCsiPluginDiscoverer(logger, registry, config.CSIPaths, config.CSIMountRootDir, config.MapfsPath)
56+
csiDiscoverer := voldiscoverers.NewCsiPluginDiscoverer(logger, registry, config.CSIPaths, config.CSIMountRootDir)
5857

5958
syncer := NewSyncer(logger, registry, []volman.Discoverer{dockerDiscoverer, csiDiscoverer}, config.SyncInterval, clock)
6059
purger := NewMountPurger(logger, registry)

0 commit comments

Comments
 (0)