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
404422dba1
commit
4e122214f7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue