-
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
Fixes watch tracking during reloads and fixes address issue. #3189
Conversation
This patch fixes watch registration through the config file and a broken log line when the watch registration fails. Fixes #3177
…nit test. Fixes issue#3185
This plumbs all the watch loading through a common function and tweaks the unit test to create the watch before the reload.
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 nit-picks other than that LGTM.
agent/agent.go
Outdated
httpAddr, err := newCfg.ClientListener(newCfg.Addresses.HTTP, newCfg.Ports.HTTP) | ||
if err != nil { | ||
errs = multierror.Append(errs, fmt.Errorf("Failed to determine HTTP address: %v", err)) | ||
// Reload the watches. |
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.
Comment is redundant.
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.
Removed in 4a3604a.
agent/agent_endpoint_test.go
Outdated
for _, w := range cfg.WatchPlans { | ||
if !w.IsStopped() { | ||
|
||
// Verify that previous config's watch plans were stopped. |
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.
Comment is redundant.
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.
Removed in 4a3604a.
Fixes #3177.
Closes #3181.
Closes #3186.