mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00: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:
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.perfStandby {
|
||||||
|
// Policies will sync from the active
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure that the default policy exists, and if not, create it
|
// Ensure that the default policy exists, and if not, create it
|
||||||
if err := c.policyStore.loadACLPolicy(ctx, defaultPolicyName, defaultPolicy); err != nil {
|
if err := c.policyStore.loadACLPolicy(ctx, defaultPolicyName, defaultPolicy); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user