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

agent: Fix assignment of error when auto-reloading cert and key file changes. #15769

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

jmurret
Copy link
Contributor

@jmurret jmurret commented Dec 12, 2022

Description

For both the key and cert file watcher code, a call to a.configFileWatcher.Replace() is made but the error returned from this called is not used...but a check is right below it like this:

				a.configFileWatcher.Replace(f.oldCfg.KeyFile, f.newCfg.KeyFile)
				if err != nil {
					return err
				}

This seems to be an omission rather than strategic. In its current case, this will either check on a previous error, or will never get triggered because a previous check would have exited.

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

@jmurret jmurret mentioned this pull request Dec 12, 2022
26 tasks
@jmurret jmurret changed the title Adding the setting of errors missing in config file watcher code in agent. Adding the setting of errors missing in key and cert file watcher code in agent. Dec 12, 2022
@jmurret jmurret changed the title Adding the setting of errors missing in key and cert file watcher code in agent. agent: Fix assignment of error when auto-reloading cert and key file changes. Dec 12, 2022
@jmurret jmurret marked this pull request as ready for review December 12, 2022 18:50
Copy link
Collaborator

@dhiaayachi dhiaayachi left a comment

Choose a reason for hiding this comment

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

Thank you for extracting this @jmurret, LGTM!

Do you think we should backport this to 1.14,1.13 and 1.12? I think it's self contained enough to be considered.

@jmurret
Copy link
Contributor Author

jmurret commented Dec 12, 2022

@dhiaayachi Agree. Will backport.

@jmurret jmurret added backport-inactive/1.12 This release series is no longer active backport-inactive/1.13 This release series is no longer active backport-inactive/1.14 This release series is no longer active labels Dec 12, 2022
@jmurret jmurret merged commit cd53120 into main Dec 12, 2022
@jmurret jmurret deleted the jm/missing-errs branch December 12, 2022 19:24
t-eckert pushed a commit that referenced this pull request Dec 15, 2022
…changes. (#15769)

* Adding the setting of errors missing in config file watcher code in agent.

* add changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-inactive/1.12 This release series is no longer active backport-inactive/1.13 This release series is no longer active backport-inactive/1.14 This release series is no longer active
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants