mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
backport of commit b0fef53184 (#23295)
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
This commit is contained in:
committed by
GitHub
parent
0943b82368
commit
df6180f9b5
@@ -91,6 +91,15 @@ func (a *acmeState) Initialize(b *backend, sc *storageContext) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *acmeState) Shutdown(b *backend) {
|
||||
// If we aren't the active node, nothing to shutdown
|
||||
if b.System().ReplicationState().HasState(consts.ReplicationDRSecondary | consts.ReplicationPerformanceStandby) {
|
||||
return
|
||||
}
|
||||
|
||||
a.validator.Closing <- struct{}{}
|
||||
}
|
||||
|
||||
func (a *acmeState) markConfigDirty() {
|
||||
a.configDirty.Store(true)
|
||||
}
|
||||
|
||||
@@ -430,7 +430,8 @@ func (b *backend) initialize(ctx context.Context, ir *logical.InitializationRequ
|
||||
|
||||
func (b *backend) cleanup(ctx context.Context) {
|
||||
sc := b.makeStorageContext(ctx, b.storage)
|
||||
b.acmeState.validator.Closing <- struct{}{}
|
||||
|
||||
b.acmeState.Shutdown(b)
|
||||
|
||||
b.cleanupEnt(sc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user