fix(worker): Improper reload when running as controller and worker (#2438)

In cases where the server was started with both a controller and worker
stanza, the reload of the config was not properly setting the initial
upstream value on the new config. In this case the value is derived from
other config values and not necessarily set directly.

This now properly initializes the new config so that initial upstream is
set in the same manner as the first load.

Blame: 5d0cdf680f
This commit is contained in:
Timothy Messier authored and GitHub committed 2022-09-12 09:37:13 -04:00
1 parent 0b942f4493
commit 047a66e87d
7 files changed
+653 -387

No files matched your search

+1 -1
View File
@@ -650,7 +650,7 @@ func TestControllerConfig(t testing.TB, ctx context.Context, tc *TestController,
if err := tc.b.SetupListeners(nil, opts.Config.SharedConfig, []string{"api", "cluster", "ops"}); err != nil {
t.Fatal(err)
}
if err := tc.b.SetupControllerPublicClusterAddress(opts.Config, ""); err != nil {
if err := opts.Config.SetupControllerPublicClusterAddress(""); err != nil {
t.Fatal(err)
}