Skip to content
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

Merged
merged 1 commit into from
Jun 24, 2017
Merged

Conversation

slackpad
Copy link
Contributor

Closes #3171.

Copy link
Contributor

@kyhavlov kyhavlov left a comment

Choose a reason for hiding this comment

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

LGTM

@slackpad slackpad merged commit 380c8b9 into master Jun 24, 2017
@slackpad slackpad deleted the host-id-sense branch June 24, 2017 16:36
Copy link
Contributor

@magiconair magiconair left a 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)
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do?

Copy link
Contributor Author

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{})
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants