mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #37738 from tiborvass/remove-unused-field-in-builder
builder: remove unused netnsRoot field in builder-next
This commit is contained in:
commit
4842f7a867
5 changed files with 4 additions and 7 deletions
|
@ -52,7 +52,6 @@ func init() {
|
||||||
type Opt struct {
|
type Opt struct {
|
||||||
SessionManager *session.Manager
|
SessionManager *session.Manager
|
||||||
Root string
|
Root string
|
||||||
NetnsRoot string
|
|
||||||
Dist images.DistributionServices
|
Dist images.DistributionServices
|
||||||
NetworkController libnetwork.NetworkController
|
NetworkController libnetwork.NetworkController
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ func newController(rt http.RoundTripper, opt Opt) (*control.Controller, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
exec, err := newExecutor(root, opt.NetnsRoot, opt.NetworkController)
|
exec, err := newExecutor(root, opt.NetworkController)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ import (
|
||||||
|
|
||||||
const networkName = "bridge"
|
const networkName = "bridge"
|
||||||
|
|
||||||
func newExecutor(root, netnsRoot string, net libnetwork.NetworkController) (executor.Executor, error) {
|
func newExecutor(root string, net libnetwork.NetworkController) (executor.Executor, error) {
|
||||||
networkProviders := map[pb.NetMode]network.Provider{
|
networkProviders := map[pb.NetMode]network.Provider{
|
||||||
pb.NetMode_UNSET: &bridgeProvider{NetworkController: net, netnsRoot: netnsRoot},
|
pb.NetMode_UNSET: &bridgeProvider{NetworkController: net},
|
||||||
pb.NetMode_HOST: network.NewHostProvider(),
|
pb.NetMode_HOST: network.NewHostProvider(),
|
||||||
pb.NetMode_NONE: network.NewNoneProvider(),
|
pb.NetMode_NONE: network.NewNoneProvider(),
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ func newExecutor(root, netnsRoot string, net libnetwork.NetworkController) (exec
|
||||||
|
|
||||||
type bridgeProvider struct {
|
type bridgeProvider struct {
|
||||||
libnetwork.NetworkController
|
libnetwork.NetworkController
|
||||||
netnsRoot string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *bridgeProvider) New() (network.Namespace, error) {
|
func (p *bridgeProvider) New() (network.Namespace, error) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/moby/buildkit/executor"
|
"github.com/moby/buildkit/executor"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newExecutor(_, _ string, _ libnetwork.NetworkController) (executor.Executor, error) {
|
func newExecutor(_ string, _ libnetwork.NetworkController) (executor.Executor, error) {
|
||||||
return &winExecutor{}, nil
|
return &winExecutor{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,6 @@ func newRouterOptions(config *config.Config, daemon *daemon.Daemon) (routerOptio
|
||||||
bk, err := buildkit.New(buildkit.Opt{
|
bk, err := buildkit.New(buildkit.Opt{
|
||||||
SessionManager: sm,
|
SessionManager: sm,
|
||||||
Root: filepath.Join(config.Root, "buildkit"),
|
Root: filepath.Join(config.Root, "buildkit"),
|
||||||
NetnsRoot: filepath.Join(config.ExecRoot, "netns"),
|
|
||||||
Dist: daemon.DistributionServices(),
|
Dist: daemon.DistributionServices(),
|
||||||
NetworkController: daemon.NetworkController(),
|
NetworkController: daemon.NetworkController(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue