mirror of https://github.com/docker/docs.git
Merge pull request #8068 from jfrazelle/cleanup-various-fix-me-refs
Cleanup various fix me refs
This commit is contained in:
commit
ffbd8fe5b9
|
@ -10,7 +10,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultNetworkMtu = 1500
|
defaultNetworkMtu = 1500
|
||||||
DisableNetworkBridge = "none"
|
disableNetworkBridge = "none"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config define the configuration of a docker daemon
|
// Config define the configuration of a docker daemon
|
||||||
|
|
|
@ -695,8 +695,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||||
if !config.EnableIptables && !config.InterContainerCommunication {
|
if !config.EnableIptables && !config.InterContainerCommunication {
|
||||||
return nil, fmt.Errorf("You specified --iptables=false with --icc=false. ICC uses iptables to function. Please set --icc or --iptables to true.")
|
return nil, fmt.Errorf("You specified --iptables=false with --icc=false. ICC uses iptables to function. Please set --icc or --iptables to true.")
|
||||||
}
|
}
|
||||||
// FIXME: DisableNetworkBidge doesn't need to be public anymore
|
config.DisableNetwork = config.BridgeIface == disableNetworkBridge
|
||||||
config.DisableNetwork = config.BridgeIface == DisableNetworkBridge
|
|
||||||
|
|
||||||
// Claim the pidfile first, to avoid any and all unexpected race conditions.
|
// Claim the pidfile first, to avoid any and all unexpected race conditions.
|
||||||
// Some of the init doesn't need a pidfile lock - but let's not try to be smart.
|
// Some of the init doesn't need a pidfile lock - but let's not try to be smart.
|
||||||
|
@ -711,25 +710,24 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that the system is supported and we have sufficient privileges
|
// Check that the system is supported and we have sufficient privileges
|
||||||
// FIXME: return errors instead of calling Fatal
|
|
||||||
if runtime.GOOS != "linux" {
|
if runtime.GOOS != "linux" {
|
||||||
log.Fatalf("The Docker daemon is only supported on linux")
|
return nil, fmt.Errorf("The Docker daemon is only supported on linux")
|
||||||
}
|
}
|
||||||
if os.Geteuid() != 0 {
|
if os.Geteuid() != 0 {
|
||||||
log.Fatalf("The Docker daemon needs to be run as root")
|
return nil, fmt.Errorf("The Docker daemon needs to be run as root")
|
||||||
}
|
}
|
||||||
if err := checkKernelAndArch(); err != nil {
|
if err := checkKernelAndArch(); err != nil {
|
||||||
log.Fatalf(err.Error())
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up the TempDir to use a canonical path
|
// set up the TempDir to use a canonical path
|
||||||
tmp, err := utils.TempDir(config.Root)
|
tmp, err := utils.TempDir(config.Root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to get the TempDir under %s: %s", config.Root, err)
|
return nil, fmt.Errorf("Unable to get the TempDir under %s: %s", config.Root, err)
|
||||||
}
|
}
|
||||||
realTmp, err := utils.ReadSymlinkedDirectory(tmp)
|
realTmp, err := utils.ReadSymlinkedDirectory(tmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to get the full path to the TempDir (%s): %s", tmp, err)
|
return nil, fmt.Errorf("Unable to get the full path to the TempDir (%s): %s", tmp, err)
|
||||||
}
|
}
|
||||||
os.Setenv("TMPDIR", realTmp)
|
os.Setenv("TMPDIR", realTmp)
|
||||||
if !config.EnableSelinuxSupport {
|
if !config.EnableSelinuxSupport {
|
||||||
|
@ -743,7 +741,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error)
|
||||||
} else {
|
} else {
|
||||||
realRoot, err = utils.ReadSymlinkedDirectory(config.Root)
|
realRoot, err = utils.ReadSymlinkedDirectory(config.Root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to get the full path to root (%s): %s", config.Root, err)
|
return nil, fmt.Errorf("Unable to get the full path to root (%s): %s", config.Root, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config.Root = realRoot
|
config.Root = realRoot
|
||||||
|
|
Loading…
Reference in New Issue