Skip to content

Commit

Permalink
backport of commit e439289 (hashicorp#19746)
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-secure-vault-core authored Mar 24, 2023
1 parent 318ac8b commit d622e81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/19721.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core: Fix regression breaking non-raft clusters whose nodes share the same cluster_addr/api_addr.
```
2 changes: 1 addition & 1 deletion vault/ha.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (c *Core) Leader() (isLeader bool, leaderAddr, clusterAddr string, err erro
// to ourself, there's no point in paying any attention to it. And by
// disregarding it, we can avoid a panic in raft tests using the Inmem network
// layer when we try to connect back to ourself.
if adv.ClusterAddr == c.ClusterAddr() && adv.RedirectAddr == c.redirectAddr {
if adv.ClusterAddr == c.ClusterAddr() && adv.RedirectAddr == c.redirectAddr && c.getRaftBackend() != nil {
return false, "", "", nil
}

Expand Down

0 comments on commit d622e81

Please sign in to comment.