From e43894c8d3415683633ea16eee63592248436335 Mon Sep 17 00:00:00 2001 From: Ranjandas Date: Thu, 15 Jun 2023 17:54:01 +1000 Subject: [PATCH] Fixes Secondary ConnectCA update This fixes a bug that was identified which resulted in subsequent ConnectCA configuration update not to persist in the cluster. --- agent/consul/leader_connect_ca.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/consul/leader_connect_ca.go b/agent/consul/leader_connect_ca.go index 8c715588eece3..dad14c4bba097 100644 --- a/agent/consul/leader_connect_ca.go +++ b/agent/consul/leader_connect_ca.go @@ -735,7 +735,9 @@ func shouldPersistNewRootAndConfig(newActiveRoot *structs.CARoot, oldConfig, new if newConfig == nil { return false } - return newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config) + + // Need not persist when the provider, old and new config is the same + return !(newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config)) } func (c *CAManager) UpdateConfiguration(args *structs.CARequest) (reterr error) {