Remove use of exec-root in plugins due to socket pathname limits.

Unix sockets are limited to 108 bytes. As a result, we need to be
careful in not using exec-root as the parent directory for pluginID
(which is already 64 bytes), since it can result in socket path names
longer than 108 bytes. Use /tmp instead. Before this change, setting:
- dockerd --exec-root=/go/src/github.com/do passes
- dockerd --exec-root=/go/src/github.com/doc fails
After this change, there's no failure.

Also, write a volume plugins test to verify that the plugins socket
responds.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 21ecd5a93db34288c0c579d5738030716d7bef2d
Component: engine
This commit is contained in:
Anusha Ragunathan
2016-07-08 10:37:52 -07:00
parent 158079c51b
commit 0633dc391e
4 changed files with 58 additions and 14 deletions

View File

@ -10,5 +10,5 @@ import (
)
func pluginInit(config *daemon.Config, remote libcontainerd.Remote, rs registry.Service) error {
return plugin.Init(config.Root, config.ExecRoot, remote, rs, config.LiveRestore)
return plugin.Init(config.Root, remote, rs, config.LiveRestore)
}