1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #30686 from anusha-ragunathan/windowsPath

Add Windows specific exec root for plugins.
This commit is contained in:
Vincent Demeester 2017-02-04 16:12:16 +01:00 committed by GitHub
commit eb6b972c49
3 changed files with 15 additions and 1 deletions

View file

@ -569,7 +569,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
// Plugin system initialization should happen before restore. Do not change order.
d.pluginManager, err = plugin.NewManager(plugin.ManagerConfig{
Root: filepath.Join(config.Root, "plugins"),
ExecRoot: "/run/docker/plugins", // possibly needs fixing
ExecRoot: getPluginExecRoot(config.Root),
Store: d.PluginStore,
Executor: containerdRemote,
RegistryService: registryService,

View file

@ -12,6 +12,14 @@ import (
"github.com/docker/docker/pkg/mount"
)
// On Linux, plugins use a static path for storing execution state,
// instead of deriving path from daemon's exec-root. This is because
// plugin socket files are created here and they cannot exceed max
// path length of 108 bytes.
func getPluginExecRoot(root string) string {
return "/run/docker/plugins"
}
func (daemon *Daemon) cleanupMountsByID(id string) error {
logrus.Debugf("Cleaning up old mountid %s: start.", id)
f, err := os.Open("/proc/self/mountinfo")

View file

@ -3,6 +3,7 @@ package daemon
import (
"fmt"
"os"
"path/filepath"
"strings"
"github.com/Microsoft/hcsshim"
@ -37,6 +38,11 @@ const (
windowsMinCPUCount = 1
)
// Windows has no concept of an execution state directory. So use config.Root here.
func getPluginExecRoot(root string) string {
return filepath.Join(root, "plugins")
}
func getBlkioWeightDevices(config *containertypes.HostConfig) ([]blkiodev.WeightDevice, error) {
return nil, nil
}