Backport of agent: Fix assignment of error when auto-reloading cert and key file changes. into release/1.14.x (#15772)

* backport of commit 7d0cf566ca

* backport of commit 024c8a84a6

* removing unused reference to pboperator

Co-authored-by: John Murret <john.murret@hashicorp.com>
pull/15854/head
hc-github-team-consul-core 2 years ago committed by GitHub
parent 718a7bc58d
commit 7c934a4bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,3 @@
```release-note:bug
agent: Fix assignment of error when auto-reloading cert and key file changes.
```

@ -4024,13 +4024,13 @@ func (a *Agent) reloadConfig(autoReload bool) error {
{a.config.TLS.HTTPS, newCfg.TLS.HTTPS},
} {
if f.oldCfg.KeyFile != f.newCfg.KeyFile {
a.configFileWatcher.Replace(f.oldCfg.KeyFile, f.newCfg.KeyFile)
err = a.configFileWatcher.Replace(f.oldCfg.KeyFile, f.newCfg.KeyFile)
if err != nil {
return err
}
}
if f.oldCfg.CertFile != f.newCfg.CertFile {
a.configFileWatcher.Replace(f.oldCfg.CertFile, f.newCfg.CertFile)
err = a.configFileWatcher.Replace(f.oldCfg.CertFile, f.newCfg.CertFile)
if err != nil {
return err
}

Loading…
Cancel
Save