-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Changes host-based node IDs from opt-out to opt-in. #3187
Conversation
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.
LGTM
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.
Two small comments
@@ -238,6 +241,7 @@ func (cmd *AgentCommand) readConfig() *agent.Config { | |||
cmdCfg.DNSRecursors = append(cmdCfg.DNSRecursors, dnsRecursors...) | |||
|
|||
cfg = agent.MergeConfig(cfg, &cmdCfg) | |||
disableHostNodeID.Merge(cfg.DisableHostNodeID) |
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.
What does this do?
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.
If the CLI argument was set (pointer is non-null), then this will take its value and lay it on top of the one from the config files. This ended up being kind of nasty because we had a CLI version of the flag, not just a config one, so it needed this special handling.
tmpDir := testutil.TempDir(t, "consul") | ||
defer os.RemoveAll(tmpDir) | ||
|
||
shutdownCh := make(chan struct{}) |
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.
Just curious if you need the shutdownCh
if you're just reading the config.
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.
You are right - this isn't needed so I'll delete it.
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.
Closes #3171.