mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Do not attempt to write a new TLS keyring at startup if raft is already setup (#17079)
This commit is contained in:
2
changelog/17079.txt
Normal file
2
changelog/17079.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
```release-note:bug
|
||||
storage/raft: Fix error writing raft TLS keyring during follower joins
|
||||
@@ -73,14 +73,15 @@ func (c *Core) startRaftBackend(ctx context.Context) (retErr error) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var creating bool
|
||||
var raftTLS *raft.TLSKeyring
|
||||
if !raftBackend.Initialized() {
|
||||
// Retrieve the raft TLS information
|
||||
raftTLSEntry, err := c.barrier.Get(ctx, raftTLSStoragePath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var creating bool
|
||||
var raftTLS *raft.TLSKeyring
|
||||
switch raftTLSEntry {
|
||||
case nil:
|
||||
// If this is HA-only and no TLS keyring is found, that means the
|
||||
@@ -140,6 +141,7 @@ func (c *Core) startRaftBackend(ctx context.Context) (retErr error) {
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if retErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user