Skip to content

Commit

Permalink
Fixes Secondary ConnectCA update (#17846)
Browse files Browse the repository at this point in the history
This fixes a bug that was identified which resulted in subsequent
ConnectCA configuration update not to persist in the cluster.
  • Loading branch information
Ranjandas authored Jun 29, 2023
1 parent bdf4fad commit 1b1f33f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/17846.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
connect/ca: Fixes a bug preventing CA configuration updates in secondary datacenters
```
4 changes: 3 additions & 1 deletion agent/consul/leader_connect_ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

// 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) {
Expand Down

0 comments on commit 1b1f33f

Please sign in to comment.