mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-03 20:40:45 -05:00
core: fix start up policy loading race condition on perf standbys (#17801)
* core: fix start up policy loading race condition on perf standbys * Use correct bool for perf standby * changelog
This commit is contained in:
parent
5d481e282c
commit
c040949c00
2 changed files with 9 additions and 0 deletions
4
changelog/17801.txt
Normal file
4
changelog/17801.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
```release-note:bug
|
||||
core: fix a start up race condition where performance standbys could go into a
|
||||
mount loop if default policies are not yet synced from the active node.
|
||||
```
|
||||
|
|
@ -264,6 +264,11 @@ func (c *Core) setupPolicyStore(ctx context.Context) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if c.perfStandby {
|
||||
// Policies will sync from the active
|
||||
return nil
|
||||
}
|
||||
|
||||
// Ensure that the default policy exists, and if not, create it
|
||||
if err := c.policyStore.loadACLPolicy(ctx, defaultPolicyName, defaultPolicy); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue