mirror of
https://github.com/status-im/consul.git
synced 2025-02-16 15:47:21 +00:00
Move assertion to after config fetch
This commit is contained in:
parent
da5bcc574e
commit
400697507b
@ -16,7 +16,7 @@ func (s *Server) getCARoots(ws memdb.WatchSet, state *state.Store) (*structs.Ind
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if config == nil {
|
if config == nil || config.ClusterID == "" {
|
||||||
return nil, fmt.Errorf("CA has not finished initializing")
|
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.
|
// defensive.
|
||||||
return nil, fmt.Errorf("no cluster trust domain setup")
|
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()
|
indexedRoots.TrustDomain = signingID.Host()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user