Merge pull request #11545 from hashicorp/spiffe-assertion

Use ClusterID to check for readiness
This commit is contained in:
Freddy 2021-11-10 12:16:41 -07:00 committed by GitHub
commit 09ef65d053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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")
} }
@ -31,9 +31,6 @@ func (s *Server) getCARoots(ws memdb.WatchSet, state *state.Store) (*structs.Ind
} }
indexedRoots.TrustDomain = signingID.Host() indexedRoots.TrustDomain = signingID.Host()
if indexedRoots.TrustDomain == "" {
return nil, fmt.Errorf("CA has not finished initializing")
}
indexedRoots.Index, indexedRoots.Roots = index, roots indexedRoots.Index, indexedRoots.Roots = index, roots
if indexedRoots.Roots == nil { if indexedRoots.Roots == nil {

View File

@ -23,7 +23,7 @@ load helpers
} }
@test "primary should be able to rpc to the secondary" { @test "primary should be able to rpc to the secondary" {
retry_default curl -sL -f -XPUT localhost:8500/v1/kv/foo?dc=secondary -d'{"Value":"bar"}' retry_long curl -sL -f -XPUT localhost:8500/v1/kv/foo?dc=secondary -d'{"Value":"bar"}'
} }
@test "wan pool should show 2 healthy nodes" { @test "wan pool should show 2 healthy nodes" {