From d9f8f7df37195d7d1e0894891ace4f4b2e04ec4c Mon Sep 17 00:00:00 2001 From: Pablo Ruiz Date: Sat, 17 Sep 2022 04:24:34 +0200 Subject: [PATCH 1/2] Invoke FingerprintManager's Reload() func during agent's SIGHUP --- client/client.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index cfe8fcd6c007..0493c2c2b885 100644 --- a/client/client.go +++ b/client/client.go @@ -297,6 +297,9 @@ type Client struct { endpoints rpcEndpoints streamingRpcs *structs.StreamingRpcRegistry + // fingerprintManager is the FingerprintManager registered by the client + fingerprintManager *FingerprintManager + // pluginManagers is the set of PluginManagers registered by the client pluginManagers *pluginmanager.PluginGroup @@ -440,14 +443,14 @@ func NewClient(cfg *config.Config, consulCatalog consul.CatalogAPI, consulProxie return nil, fmt.Errorf("node setup failed: %v", err) } - fingerprintManager := NewFingerprintManager( + c.fingerprintManager = NewFingerprintManager( cfg.PluginSingletonLoader, c.GetConfig, cfg.Node, c.shutdownCh, c.updateNodeFromFingerprint, c.logger) c.pluginManagers = pluginmanager.New(c.logger) // Fingerprint the node and scan for drivers - if err := fingerprintManager.Run(); err != nil { + if err := c.fingerprintManager.Run(); err != nil { return nil, fmt.Errorf("fingerprinting failed: %v", err) } @@ -742,6 +745,8 @@ func (c *Client) Reload(newConfig *config.Config) error { return c.reloadTLSConnections(newConfig.TLSConfig) } + c.fingerprintManager.Reload() + return nil } From 89c7635e7898d7582671c87df544f0f87a02f29f Mon Sep 17 00:00:00 2001 From: Pablo Ruiz Date: Tue, 4 Oct 2022 00:07:47 +0200 Subject: [PATCH 2/2] Added missing changelog file/entry for #14615 --- .changelog/14615.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/14615.txt diff --git a/.changelog/14615.txt b/.changelog/14615.txt new file mode 100644 index 000000000000..6d8bb481f8b8 --- /dev/null +++ b/.changelog/14615.txt @@ -0,0 +1,3 @@ +```release-note:bug +client: Fixed a bug where network fingerprinters were not reloaded when the client configuration was reloaded with SIGHUP +```