Secondary CA Cert is generated twice during initialization #6886
Labels
theme/connect
Anything related to Consul Connect, Service Mesh, Side Car Proxies
type/bug
Feature does not function as expected
Overview of the Issue
During initialize of a secondary datacenters CA, it will do two rounds of CSR generation and RPCs to get it signed by the primary instead of 1.
The first is done here:
consul/agent/consul/leader_connect.go
Line 204 in 6817676
Then the
secondaryCARootWatch
routine is started and another one takes place here:consul/agent/consul/leader_connect.go
Line 610 in 6817676
The root cause of this is that we are making no attempt to prevent certificate regeneration when the roots haven't changed. The
secondaryCARootWatch
routine starts initially with performing a non-blocking query which will return immediately with the same roots as the same RPC performed ininitializeCA
.This should be benign enough but maybe we want to fix it 🤷♂
Reproduction Steps
Steps to reproduce this issue, eg:
The text was updated successfully, but these errors were encountered: