This is required to make the libnetwork's namespace mgmt
directory configurable
Signed-off-by: Madhu Venugopal <madhu@docker.com>
| ... | ... |
@@ -38,6 +38,10 @@ func (config *Config) InstallFlags(cmd *flag.FlagSet, usageFn func(string) strin |
| 38 | 38 |
config.attachExperimentalFlags(cmd, usageFn) |
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 |
+// GetExecRoot returns the user configured Exec-root |
|
| 42 |
+func (config *Config) GetExecRoot() string {
|
|
| 43 |
+ return config.ExecRoot |
|
| 44 |
+} |
|
| 41 | 45 |
func (config *Config) isSwarmCompatible() error {
|
| 42 | 46 |
return nil |
| 43 | 47 |
} |
| ... | ... |
@@ -124,6 +124,11 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime {
|
| 124 | 124 |
return rts |
| 125 | 125 |
} |
| 126 | 126 |
|
| 127 |
+// GetExecRoot returns the user configured Exec-root |
|
| 128 |
+func (config *Config) GetExecRoot() string {
|
|
| 129 |
+ return config.ExecRoot |
|
| 130 |
+} |
|
| 131 |
+ |
|
| 127 | 132 |
func (config *Config) isSwarmCompatible() error {
|
| 128 | 133 |
if config.ClusterStore != "" || config.ClusterAdvertise != "" {
|
| 129 | 134 |
return fmt.Errorf("--cluster-store and --cluster-advertise daemon configurations are incompatible with swarm mode")
|
| ... | ... |
@@ -58,6 +58,11 @@ func (config *Config) GetAllRuntimes() map[string]types.Runtime {
|
| 58 | 58 |
return map[string]types.Runtime{}
|
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 |
+// GetExecRoot returns the user configured Exec-root |
|
| 62 |
+func (config *Config) GetExecRoot() string {
|
|
| 63 |
+ return "" |
|
| 64 |
+} |
|
| 65 |
+ |
|
| 61 | 66 |
func (config *Config) isSwarmCompatible() error {
|
| 62 | 67 |
return nil |
| 63 | 68 |
} |
| ... | ... |
@@ -1041,6 +1041,7 @@ func (daemon *Daemon) networkOptions(dconfig *Config, activeSandboxes map[string |
| 1041 | 1041 |
} |
| 1042 | 1042 |
|
| 1043 | 1043 |
options = append(options, nwconfig.OptionDataDir(dconfig.Root)) |
| 1044 |
+ options = append(options, nwconfig.OptionExecRoot(dconfig.GetExecRoot())) |
|
| 1044 | 1045 |
|
| 1045 | 1046 |
dd := runconfig.DefaultDaemonNetworkMode() |
| 1046 | 1047 |
dn := runconfig.DefaultDaemonNetworkMode().NetworkName() |