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>
(cherry picked from commit d3af5e3d4b)
Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Madhu Venugopal 2016-07-21 16:13:10 -07:00 committed by Tibor Vass
parent a0d1201e02
commit 1cc85c1726
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)
}
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return config.ExecRoot
}
func (config *Config) isSwarmCompatible() error {
return nil
}

View file

@ -124,6 +124,11 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime {
return rts
}
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return config.ExecRoot
}
func (config *Config) isSwarmCompatible() error {
if config.ClusterStore != "" || config.ClusterAdvertise != "" {
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{}
}
// GetExecRoot returns the user configured Exec-root
func (config *Config) GetExecRoot() string {
return ""
}
func (config *Config) isSwarmCompatible() error {
return nil
}

View file

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