Skip to content

Commit

Permalink
resmgr: set goresctrl path prefix
Browse files Browse the repository at this point in the history
Fixes issues with controllers that utilize "github.com/intel/goresctrl"
which previously didn't support specifying non-standard mount paths for
(host) system directories.

Signed-off-by: Markus Lehtonen <[email protected]>
  • Loading branch information
marquiz authored and jukkar committed Jun 21, 2023
1 parent de7b3c6 commit b716519
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/resmgr/resource-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"github.com/containers/nri-plugins/pkg/resmgr/policy"
"github.com/containers/nri-plugins/pkg/sysfs"
"github.com/containers/nri-plugins/pkg/topology"
goresctrlpath "github.com/intel/goresctrl/pkg/path"

policyCollector "github.com/containers/nri-plugins/pkg/resmgr/policycollector"
)
Expand Down Expand Up @@ -92,6 +93,10 @@ func NewResourceManager() (ResourceManager, error) {
topology.SetSysRoot(opt.HostRoot)
topology.SetLogger(logger.Get(topologyLogger))

if opt.HostRoot != "" {
goresctrlpath.SetPrefix(opt.HostRoot)
}

m.Info("running as an NRI plugin...")
nrip, err := newNRIPlugin(m)
if err != nil {
Expand Down

0 comments on commit b716519

Please sign in to comment.