Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Remove -D when we set rancher.debug=false #897

Merged

Conversation

datawolf
Copy link
Contributor

when we set rancher.debug to true, the current code also set -D flag
to system-docker and user-docker daemon.
and then we change rancher.debug to false, the -D flag is also exist
by using command sudo ros config get rancher.docker.

this patch fix it.

Signed-off-by: Wang Long long.wanglong@huawei.com

if util.Contains(cfg.Rancher.Docker.Args, "-D") {
cfg.Rancher.Docker.Args = util.FilterStrings(cfg.Rancher.Docker.Args, func(x string) bool { return x != "-D" })
}
if !util.Contains(cfg.Rancher.SystemDocker.Args, "-D") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@datawolf You probably want to skip ! here if you want to test if cfg.Rancher.SystemDocker.Args contains -D

@imikushin
Copy link
Contributor

Just one line comment above. Otherwise looks good.

@datawolf datawolf force-pushed the fix-set-rancher.debug-error branch from 81f364f to fa98165 Compare April 29, 2016 01:55
when we set rancher.debug to true, the current code also set `-D` flag
to system-docker and user-docker daemon.
and then we change rancher.debug to false, the `-D` flag is also exist
by using command `sudo ros config get rancher.docker`.

this patch fix it.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
@datawolf
Copy link
Contributor Author

@imikushin Sorry for the mistake, the patch have been updated.

@imikushin
Copy link
Contributor

LGTM

@ibuildthecloud ibuildthecloud merged commit c94f245 into rancher:master May 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants