From f248c1dfaf5dd8e43354255f7f4eadb4a772d2f4 Mon Sep 17 00:00:00 2001 From: Brian Kassouf Date: Wed, 22 Jul 2020 14:49:51 -0700 Subject: [PATCH] raft: Update raft library dependency (#9571) --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/hashicorp/raft/README.md | 2 +- vendor/github.com/hashicorp/raft/raft.go | 4 ++++ vendor/github.com/hashicorp/raft/tcp_transport.go | 2 +- vendor/modules.txt | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 686423c39d2..aedf360d696 100644 --- a/go.mod +++ b/go.mod @@ -63,7 +63,7 @@ require ( github.com/hashicorp/golang-lru v0.5.3 github.com/hashicorp/hcl v1.0.0 github.com/hashicorp/nomad/api v0.0.0-20191220223628-edc62acd919d - github.com/hashicorp/raft v1.1.3-0.20200501224250-c95aa91e604e + github.com/hashicorp/raft v1.1.3-0.20200722211658-e8ce96ef55b8 github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab github.com/hashicorp/vault-plugin-auth-alicloud v0.5.5 github.com/hashicorp/vault-plugin-auth-azure v0.5.6 diff --git a/go.sum b/go.sum index 51b6f1a7c0a..ac5a2e61422 100644 --- a/go.sum +++ b/go.sum @@ -513,6 +513,8 @@ github.com/hashicorp/raft v1.1.2-0.20191002163536-9c6bd3e3eb17 h1:p+2EISNdFCnD9R github.com/hashicorp/raft v1.1.2-0.20191002163536-9c6bd3e3eb17/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= github.com/hashicorp/raft v1.1.3-0.20200501224250-c95aa91e604e h1:hMRRBhY9cayPJzEgNGNAl74TJ0rwY3Csbr43ogjKh1I= github.com/hashicorp/raft v1.1.3-0.20200501224250-c95aa91e604e/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= +github.com/hashicorp/raft v1.1.3-0.20200722211658-e8ce96ef55b8 h1:vgDEILZTOUiPvVDduEnejW24S/yNCtst+kVwhGYJl08= +github.com/hashicorp/raft v1.1.3-0.20200722211658-e8ce96ef55b8/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab h1:WzGMwlO1DvaC93SvVOBOKtn+nXGEDXapyJuaRV3/VaY= github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic= diff --git a/vendor/github.com/hashicorp/raft/README.md b/vendor/github.com/hashicorp/raft/README.md index dc8bb6448ca..7f6ff83074b 100644 --- a/vendor/github.com/hashicorp/raft/README.md +++ b/vendor/github.com/hashicorp/raft/README.md @@ -1,4 +1,4 @@ -raft [![Build Status](https://travis-ci.org/hashicorp/raft.png)](https://travis-ci.org/hashicorp/raft) [![CircleCI](https://circleci.com/gh/hashicorp/raft.svg?style=svg)](https://circleci.com/gh/hashicorp/raft) +raft [![CircleCI](https://circleci.com/gh/hashicorp/raft.svg?style=svg)](https://circleci.com/gh/hashicorp/raft) ==== raft is a [Go](http://www.golang.org) library that manages a replicated diff --git a/vendor/github.com/hashicorp/raft/raft.go b/vendor/github.com/hashicorp/raft/raft.go index c9411466601..9f7d15f3627 100644 --- a/vendor/github.com/hashicorp/raft/raft.go +++ b/vendor/github.com/hashicorp/raft/raft.go @@ -311,6 +311,10 @@ func (r *Raft) runCandidate() { // Reject any restores since we are not the leader r.respond(ErrNotLeader) + case r := <-r.leadershipTransferCh: + // Reject any operations since we are not the leader + r.respond(ErrNotLeader) + case c := <-r.configurationsCh: c.configurations = r.configurations.Clone() c.respond(nil) diff --git a/vendor/github.com/hashicorp/raft/tcp_transport.go b/vendor/github.com/hashicorp/raft/tcp_transport.go index ff40a57bcd2..3bd42195876 100644 --- a/vendor/github.com/hashicorp/raft/tcp_transport.go +++ b/vendor/github.com/hashicorp/raft/tcp_transport.go @@ -81,7 +81,7 @@ func newTCPTransport(bindAddr string, list.Close() return nil, errNotTCP } - if addr.IP.IsUnspecified() { + if addr.IP == nil || addr.IP.IsUnspecified() { list.Close() return nil, errNotAdvertisable } diff --git a/vendor/modules.txt b/vendor/modules.txt index 3614347acca..77d81e19306 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -438,7 +438,7 @@ github.com/hashicorp/logutils # github.com/hashicorp/nomad/api v0.0.0-20191220223628-edc62acd919d github.com/hashicorp/nomad/api github.com/hashicorp/nomad/api/contexts -# github.com/hashicorp/raft v1.1.3-0.20200501224250-c95aa91e604e +# github.com/hashicorp/raft v1.1.3-0.20200722211658-e8ce96ef55b8 github.com/hashicorp/raft # github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab github.com/hashicorp/raft-snapshot