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

Daemon changes to pass exec-root to libnetwork

This is required to make the libnetwork's namespace mgmt
directory configurable

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal 2016-07-21 16:13:10 -07:00 committed by Aaron Lehmann
parent fca0b18dcb
commit d3af5e3d4b
4 changed files with 15 additions and 0 deletions

View file

@ -38,6 +38,10 @@ func (config *Config) InstallFlags(cmd *flag.FlagSet, usageFn func(string) strin
config.attachExperimentalFlags(cmd, usageFn) config.attachExperimentalFlags(cmd, usageFn)
} }
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return config.ExecRoot
}
func (config *Config) isSwarmCompatible() error { func (config *Config) isSwarmCompatible() error {
return nil return nil
} }

View file

@ -124,6 +124,11 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime {
return rts return rts
} }
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return config.ExecRoot
}
func (config *Config) isSwarmCompatible() error { func (config *Config) isSwarmCompatible() error {
if config.ClusterStore != "" || config.ClusterAdvertise != "" { if config.ClusterStore != "" || config.ClusterAdvertise != "" {
return fmt.Errorf("--cluster-store and --cluster-advertise daemon configurations are incompatible with swarm mode") return fmt.Errorf("--cluster-store and --cluster-advertise daemon configurations are incompatible with swarm mode")

View file

@ -58,6 +58,11 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime {
return map[string]types.Runtime{} return map[string]types.Runtime{}
} }
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return ""
}
func (config *Config) isSwarmCompatible() error { func (config *Config) isSwarmCompatible() error {
return nil return nil
} }

View file

@ -1041,6 +1041,7 @@ func (daemon *Daemon) networkOptions(dconfig *Config, activeSandboxes map[string
} }
options = append(options, nwconfig.OptionDataDir(dconfig.Root)) options = append(options, nwconfig.OptionDataDir(dconfig.Root))
options = append(options, nwconfig.OptionExecRoot(dconfig.GetExecRoot()))
dd := runconfig.DefaultDaemonNetworkMode() dd := runconfig.DefaultDaemonNetworkMode()
dn := runconfig.DefaultDaemonNetworkMode().NetworkName() dn := runconfig.DefaultDaemonNetworkMode().NetworkName()