Ensure only primary stores the case sensitivity state (#7820)

* Ensure only primary stores the case sensitivity state

* Update the check
This commit is contained in:
Vishal Nayak 2019-11-08 12:13:53 -05:00 committed by GitHub
parent 7b803e92a3
commit 9d3d53b4f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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.System().ReplicationState().HasState(consts.ReplicationPerformanceSecondary | consts.ReplicationPerformanceStandby | consts.ReplicationDRSecondary) {
return nil
}
entry, err := logical.StorageEntryJSON(caseSensitivityKey, &casesensitivity{
DisableLowerCasedNames: i.disableLowerCasedNames,
})