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:
commit
eb6b972c49
3 changed files with 15 additions and 1 deletions
|
@ -569,7 +569,7 @@ func NewDaemon(config *Config, registryService registry.Service, containerdRemot
|
||||||
// Plugin system initialization should happen before restore. Do not change order.
|
// Plugin system initialization should happen before restore. Do not change order.
|
||||||
d.pluginManager, err = plugin.NewManager(plugin.ManagerConfig{
|
d.pluginManager, err = plugin.NewManager(plugin.ManagerConfig{
|
||||||
Root: filepath.Join(config.Root, "plugins"),
|
Root: filepath.Join(config.Root, "plugins"),
|
||||||
ExecRoot: "/run/docker/plugins", // possibly needs fixing
|
ExecRoot: getPluginExecRoot(config.Root),
|
||||||
Store: d.PluginStore,
|
Store: d.PluginStore,
|
||||||
Executor: containerdRemote,
|
Executor: containerdRemote,
|
||||||
RegistryService: registryService,
|
RegistryService: registryService,
|
||||||
|
|
|
@ -12,6 +12,14 @@ import (
|
||||||
"github.com/docker/docker/pkg/mount"
|
"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 {
|
func (daemon *Daemon) cleanupMountsByID(id string) error {
|
||||||
logrus.Debugf("Cleaning up old mountid %s: start.", id)
|
logrus.Debugf("Cleaning up old mountid %s: start.", id)
|
||||||
f, err := os.Open("/proc/self/mountinfo")
|
f, err := os.Open("/proc/self/mountinfo")
|
||||||
|
|
|
@ -3,6 +3,7 @@ package daemon
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Microsoft/hcsshim"
|
"github.com/Microsoft/hcsshim"
|
||||||
|
@ -37,6 +38,11 @@ const (
|
||||||
windowsMinCPUCount = 1
|
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) {
|
func getBlkioWeightDevices(config *containertypes.HostConfig) ([]blkiodev.WeightDevice, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue