diff --git a/agent/consul/server_connect.go b/agent/consul/server_connect.go index 32b9ef3cb..a5c569d55 100644 --- a/agent/consul/server_connect.go +++ b/agent/consul/server_connect.go @@ -16,7 +16,7 @@ func (s *Server) getCARoots(ws memdb.WatchSet, state *state.Store) (*structs.Ind if err != nil { return nil, err } - if config == nil { + if config == nil || config.ClusterID == "" { return nil, fmt.Errorf("CA has not finished initializing") } @@ -29,9 +29,6 @@ func (s *Server) getCARoots(ws memdb.WatchSet, state *state.Store) (*structs.Ind // defensive. return nil, fmt.Errorf("no cluster trust domain setup") } - if signingID.ClusterID == "" { - return nil, fmt.Errorf("CA has not finished initializing") - } indexedRoots.TrustDomain = signingID.Host()