diff --git a/changelog/17801.txt b/changelog/17801.txt new file mode 100644 index 000000000000..8d3764ad44ff --- /dev/null +++ b/changelog/17801.txt @@ -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. +``` diff --git a/vault/policy_store.go b/vault/policy_store.go index db92ebab5f9b..bdbfb6776a7b 100644 --- a/vault/policy_store.go +++ b/vault/policy_store.go @@ -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