Merge pull request #19966 from twistlock/user_namespace__unnecessary_text_in_error

user namespaces: duplicate dot in user namespaces error message
This commit is contained in:
Phil Estes 2016-02-03 12:51:51 -05:00
commit b2c162a0b3
1 changed files with 7 additions and 7 deletions

View File

@ -412,19 +412,19 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
// check for various conflicting options with user namespaces // check for various conflicting options with user namespaces
if daemon.configStore.RemappedRoot != "" { if daemon.configStore.RemappedRoot != "" {
if hostConfig.Privileged { if hostConfig.Privileged {
return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces.") return warnings, fmt.Errorf("Privileged mode is incompatible with user namespaces")
} }
if hostConfig.NetworkMode.IsHost() || hostConfig.NetworkMode.IsContainer() { if hostConfig.NetworkMode.IsHost() || hostConfig.NetworkMode.IsContainer() {
return warnings, fmt.Errorf("Cannot share the host or a container's network namespace when user namespaces are enabled.") return warnings, fmt.Errorf("Cannot share the host or a container's network namespace when user namespaces are enabled")
} }
if hostConfig.PidMode.IsHost() { if hostConfig.PidMode.IsHost() {
return warnings, fmt.Errorf("Cannot share the host PID namespace when user namespaces are enabled.") return warnings, fmt.Errorf("Cannot share the host PID namespace when user namespaces are enabled")
} }
if hostConfig.IpcMode.IsContainer() { if hostConfig.IpcMode.IsContainer() {
return warnings, fmt.Errorf("Cannot share a container's IPC namespace when user namespaces are enabled.") return warnings, fmt.Errorf("Cannot share a container's IPC namespace when user namespaces are enabled")
} }
if hostConfig.ReadonlyRootfs { if hostConfig.ReadonlyRootfs {
return warnings, fmt.Errorf("Cannot use the --read-only option when user namespaces are enabled.") return warnings, fmt.Errorf("Cannot use the --read-only option when user namespaces are enabled")
} }
} }
if hostConfig.CgroupParent != "" && daemon.usingSystemd() { if hostConfig.CgroupParent != "" && daemon.usingSystemd() {
@ -440,10 +440,10 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
func verifyDaemonSettings(config *Config) error { func verifyDaemonSettings(config *Config) error {
// Check for mutually incompatible config options // Check for mutually incompatible config options
if config.bridgeConfig.Iface != "" && config.bridgeConfig.IP != "" { if config.bridgeConfig.Iface != "" && config.bridgeConfig.IP != "" {
return fmt.Errorf("You specified -b & --bip, mutually exclusive options. Please specify only one.") return fmt.Errorf("You specified -b & --bip, mutually exclusive options. Please specify only one")
} }
if !config.bridgeConfig.EnableIPTables && !config.bridgeConfig.InterContainerCommunication { if !config.bridgeConfig.EnableIPTables && !config.bridgeConfig.InterContainerCommunication {
return fmt.Errorf("You specified --iptables=false with --icc=false. ICC=false uses iptables to function. Please set --icc or --iptables to true.") return fmt.Errorf("You specified --iptables=false with --icc=false. ICC=false uses iptables to function. Please set --icc or --iptables to true")
} }
if !config.bridgeConfig.EnableIPTables && config.bridgeConfig.EnableIPMasq { if !config.bridgeConfig.EnableIPTables && config.bridgeConfig.EnableIPMasq {
config.bridgeConfig.EnableIPMasq = false config.bridgeConfig.EnableIPMasq = false