-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate undocumented process_agent_config.host_ips
in favor of process_config.docker_host_ips
#7694
base: main
Are you sure you want to change the base?
Conversation
…rocess_config.docker_host_ips`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs review
releasenotes/notes/proces-agent-add-docs-host-ip-config-1cd97e31ec2ae586.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/proces-agent-add-docs-host-ip-config-1cd97e31ec2ae586.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/proces-agent-add-docs-host-ip-config-1cd97e31ec2ae586.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/proces-agent-add-docs-host-ip-config-1cd97e31ec2ae586.yaml
Outdated
Show resolved
Hide resolved
releasenotes/notes/proces-agent-add-docs-host-ip-config-1cd97e31ec2ae586.yaml
Outdated
Show resolved
Hide resolved
Co-authored-by: ruthnaebeck <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for docs
Would anyone from the team also be available to review the actual code? There are quite some +1s on the related issue, so I'd appreciate it if we could work towards fixing this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting a review from @DataDog/processes to review the code changes in the context of the recent improvements to the process agent config options (and whether it makes sense to rebase this PR on top of them).
Thanks for pointing it out, @olivielpeau. In fact we should rebase this PR on top of the config refactor that is introduced on process-agent |
@@ -583,6 +583,7 @@ func InitConfig(config Config) { | |||
} | |||
|
|||
config.BindEnv("process_config.process_dd_url", "") //nolint:errcheck | |||
config.BindEnvAndSetDefault("process_config.docker_host_ips", []string{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should move the setting declaration to the setupProcess
in the new pkg/config/process.go
file and use procBindEnv
. This helper function will automatically bind the env vars DD_PROCESS_CONFIG_DOCKER_HOST_IPS
and DD_PROCESS_AGENT_DOCKER_HOST_IPS
to it.
Nice to see that there is some sudden interest in this PR :) It has been a while since I've created it. I don't think I'll be able to help out much anymore, since I haven't worked with the datadog-agent lately and can't tell if this is still an issue. But, feel free to continue with it and still merge it in (once the conflicts and so on are resolved) :) |
What does this PR do?
Fixes #5081
process_agent_config.host_ips
propertyprocess_agent_config.host_ips
in favor ofprocess_config.docker_host_ips
. The old variables naming scheme is incosistent with other properties for the process agent. The old property is still supported. When both properties are used, the new one will take precedence.Motivation
I am opening this pull request to address the issue described in #5081. The default configuration for the process agent causes a warning to be logged every couple of hours. This is just noise, that can lead to confusion. The main reason seems to be an incorrect default (nil vs empty list)
Additional Notes
This is my first PR for the datadog-agent. I tried to follow allow the guidelines, but please do let me know if I have missed something.
Describe your test plan
2020-03-05 05:45:40 UTC | PROCESS | WARN | (pkg/config/viper.go:168 in GetStringSlice) | failed to get configuration value for key "process_agent_config.host_ips": unable to cast <nil> of type <nil> to []string
is not printed