From 669311cc9f1497910a73a05a45c08eef40672488 Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Wed, 6 Nov 2019 17:37:17 -0500 Subject: [PATCH 1/2] Ensure only primary stores the case sensitivity state --- vault/identity_store.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vault/identity_store.go b/vault/identity_store.go index d04e9f187a11..eee0f7222c57 100644 --- a/vault/identity_store.go +++ b/vault/identity_store.go @@ -112,6 +112,11 @@ func (i *IdentityStore) paths() []*framework.Path { } func (i *IdentityStore) initialize(ctx context.Context, req *logical.InitializationRequest) error { + // Only primary should write the status + if i.core.ReplicationState().HasState(consts.ReplicationPerformanceSecondary | consts.ReplicationDRSecondary) { + return nil + } + entry, err := logical.StorageEntryJSON(caseSensitivityKey, &casesensitivity{ DisableLowerCasedNames: i.disableLowerCasedNames, }) From 93e0caac1791aa352197265fc29fd0337669119c Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Thu, 7 Nov 2019 10:53:59 -0500 Subject: [PATCH 2/2] Update the check --- vault/identity_store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vault/identity_store.go b/vault/identity_store.go index eee0f7222c57..8c1bc3173994 100644 --- a/vault/identity_store.go +++ b/vault/identity_store.go @@ -113,7 +113,7 @@ func (i *IdentityStore) paths() []*framework.Path { func (i *IdentityStore) initialize(ctx context.Context, req *logical.InitializationRequest) error { // Only primary should write the status - if i.core.ReplicationState().HasState(consts.ReplicationPerformanceSecondary | consts.ReplicationDRSecondary) { + if i.System().ReplicationState().HasState(consts.ReplicationPerformanceSecondary | consts.ReplicationPerformanceStandby | consts.ReplicationDRSecondary) { return nil }