Backport of Fixes Secondary ConnectCA update into release/1.15.x (#17953)

* backport of commit afa1f42cc7

* backport of commit e0970025d4

* backport of commit 2f2aad545b

* backport of commit 4a5c9c181f

---------

Co-authored-by: Ranjandas <thejranjan@gmail.com>
Co-authored-by: Chris S. Kim <kisunji92@gmail.com>
pull/17960/head
hc-github-team-consul-core 2023-06-29 09:53:15 -05:00 committed by GitHub
parent 4e3a2fd343
commit 7c3f4528ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

3
.changelog/17846.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
connect/ca: Fixes a bug preventing CA configuration updates in secondary datacenters
```

View File

@ -754,7 +754,9 @@ func shouldPersistNewRootAndConfig(newActiveRoot *structs.CARoot, oldConfig, new
if newConfig == nil {
return false
}
return newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config)
// Do not persist if the new provider and config are the same as the old
return !(newConfig.Provider == oldConfig.Provider && reflect.DeepEqual(newConfig.Config, oldConfig.Config))
}
func (c *CAManager) UpdateConfiguration(args *structs.CARequest) (reterr error) {