diff --git a/.gitmodules b/.gitmodules index e6ebc826..9f6f29f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,5 @@ [submodule "vendor/github.com/coreos/etcd"] - path = vendor/github.com/coreos/etcd + path = vendor/go.etcd.io/etcd url = https://github.com/coreos/etcd/ [submodule "vendor/google.golang.org/grpc"] path = vendor/google.golang.org/grpc diff --git a/etcd/callback.go b/etcd/callback.go index f04caa6d..995c48fe 100644 --- a/etcd/callback.go +++ b/etcd/callback.go @@ -26,8 +26,8 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + pb "go.etcd.io/etcd/etcdserver/etcdserverpb" ) // nominateApply applies the changed watcher data onto our local caches. @@ -192,7 +192,7 @@ func (obj *EmbdEtcd) nominateCb(ctx context.Context) error { // an "event" for member add since there is not any event that's // currently built-in to etcd and (3) so we have a key to expire // when we shutdown or crash to give us the member remove event. - // please see issue: https://github.com/coreos/etcd/issues/5277 + // please see issue: https://github.com/etcd-io/etcd/issues/5277 } else if obj.serverAction(serverActionStop) { // stop? // server is running, but it should not be @@ -200,7 +200,7 @@ func (obj *EmbdEtcd) nominateCb(ctx context.Context) error { // i have been un-nominated, remove self and shutdown server! // we don't need to do a member remove if i'm the last one... if len(obj.nominated) != 0 { // don't call if nobody left but me! - // work around: https://github.com/coreos/etcd/issues/5482 + // work around: https://github.com/etcd-io/etcd/issues/5482 // and it might make sense to avoid it if we're the last obj.Logf("member remove: removing self: %d", obj.serverID) resp, err := obj.memberRemove(ctx, obj.serverID) @@ -243,7 +243,7 @@ func (obj *EmbdEtcd) nominateCb(ctx context.Context) error { // volunteer entry we must respond by removing the nomination so that it can // receive that message and shutdown. // FIXME: we might need to respond to member change/disconnect/shutdown events, -// see: https://github.com/coreos/etcd/issues/5277 +// see: https://github.com/etcd-io/etcd/issues/5277 // XXX: Don't allow this function to partially run if it is canceled part way // through... We don't want an inconsistent state where we did unnominate, but // didn't remove a member... @@ -301,7 +301,7 @@ func (obj *EmbdEtcd) volunteerCb(ctx context.Context) error { // NOTE: There used to be an is_leader check right here... // FIXME: Should we use WithRequireLeader instead? Here? Elsewhere? - // https://godoc.org/github.com/coreos/etcd/clientv3#WithRequireLeader + // https://godoc.org/github.com/etcd-io/etcd/clientv3#WithRequireLeader // FIXME: can this happen, and if so, is it an error or a pass-through? if len(obj.volunteers) == 0 { diff --git a/etcd/chooser/chooser.go b/etcd/chooser/chooser.go index 09a22962..22b03b89 100644 --- a/etcd/chooser/chooser.go +++ b/etcd/chooser/chooser.go @@ -22,7 +22,7 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcdtypes "go.etcd.io/etcd/pkg/types" ) // Data represents the input data that is passed to the chooser. diff --git a/etcd/chooser/dynamicsize.go b/etcd/chooser/dynamicsize.go index 3f60f520..9112ed1f 100644 --- a/etcd/chooser/dynamicsize.go +++ b/etcd/chooser/dynamicsize.go @@ -25,8 +25,8 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" - etcd "github.com/coreos/etcd/clientv3" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcd "go.etcd.io/etcd/clientv3" + etcdtypes "go.etcd.io/etcd/pkg/types" ) // XXX: Test causing cluster shutdowns with: diff --git a/etcd/client/resources/resources.go b/etcd/client/resources/resources.go index b310dca8..ad1f3840 100644 --- a/etcd/client/resources/resources.go +++ b/etcd/client/resources/resources.go @@ -27,7 +27,7 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" "github.com/purpleidea/mgmt/util" - etcd "github.com/coreos/etcd/clientv3" + etcd "go.etcd.io/etcd/clientv3" ) const ( diff --git a/etcd/client/simple.go b/etcd/client/simple.go index f025b99b..15566a57 100644 --- a/etcd/client/simple.go +++ b/etcd/client/simple.go @@ -26,8 +26,8 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - "github.com/coreos/etcd/clientv3/namespace" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + "go.etcd.io/etcd/clientv3/namespace" ) // method represents the method we used to build the simple client. @@ -301,7 +301,7 @@ func (obj *Simple) Get(ctx context.Context, path string, opts ...etcd.OpOption) return nil, fmt.Errorf("empty response") } - // TODO: write a resp.ToMap() function on https://godoc.org/github.com/coreos/etcd/etcdserver/etcdserverpb#RangeResponse + // TODO: write a resp.ToMap() function on https://godoc.org/github.com/etcd-io/etcd/etcdserver/etcdserverpb#RangeResponse result := make(map[string]string) for _, x := range resp.Kvs { result[string(x.Key)] = string(x.Value) @@ -387,8 +387,8 @@ func (obj *Simple) ComplexWatcher(ctx context.Context, path string, opts ...etcd wg := &sync.WaitGroup{} // TODO: if we can detect the use of WithCreatedNotify, we don't need to - // hard-code it down below... https://github.com/coreos/etcd/issues/9689 - // XXX: proof of concept patch: https://github.com/coreos/etcd/pull/9705 + // hard-code it down below... https://github.com/etcd-io/etcd/issues/9689 + // XXX: proof of concept patch: https://github.com/etcd-io/etcd/pull/9705 //for _, op := range opts { // //if op.Cmp(etcd.WithCreatedNotify()) == nil { // would be best // if etcd.OpOptionCmp(op, etcd.WithCreatedNotify()) == nil { diff --git a/etcd/client/str/str.go b/etcd/client/str/str.go index 26408ece..5c74bd3b 100644 --- a/etcd/client/str/str.go +++ b/etcd/client/str/str.go @@ -24,8 +24,8 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - etcdutil "github.com/coreos/etcd/clientv3/clientv3util" + etcd "go.etcd.io/etcd/clientv3" + etcdutil "go.etcd.io/etcd/clientv3/clientv3util" ) const ( diff --git a/etcd/client/strmap/strmap.go b/etcd/client/strmap/strmap.go index 91ae7e3e..314d3134 100644 --- a/etcd/client/strmap/strmap.go +++ b/etcd/client/strmap/strmap.go @@ -26,8 +26,8 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - etcdutil "github.com/coreos/etcd/clientv3/clientv3util" + etcd "go.etcd.io/etcd/clientv3" + etcdutil "go.etcd.io/etcd/clientv3/clientv3util" ) const ( diff --git a/etcd/converger.go b/etcd/converger.go index b4d72ae7..c4587254 100644 --- a/etcd/converger.go +++ b/etcd/converger.go @@ -23,7 +23,7 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" + etcd "go.etcd.io/etcd/clientv3" ) // setHostnameConverged sets whether a specific hostname is converged. diff --git a/etcd/deployer/deployer.go b/etcd/deployer/deployer.go index 90523807..7de95378 100644 --- a/etcd/deployer/deployer.go +++ b/etcd/deployer/deployer.go @@ -27,8 +27,8 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - etcdutil "github.com/coreos/etcd/clientv3/clientv3util" + etcd "go.etcd.io/etcd/clientv3" + etcdutil "go.etcd.io/etcd/clientv3/clientv3util" ) const ( diff --git a/etcd/etcd.go b/etcd/etcd.go index ecbf3381..0ae30e83 100644 --- a/etcd/etcd.go +++ b/etcd/etcd.go @@ -122,11 +122,11 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - "github.com/coreos/etcd/clientv3/concurrency" - "github.com/coreos/etcd/clientv3/namespace" - "github.com/coreos/etcd/embed" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + "go.etcd.io/etcd/clientv3/concurrency" + "go.etcd.io/etcd/clientv3/namespace" + "go.etcd.io/etcd/embed" + etcdtypes "go.etcd.io/etcd/pkg/types" ) const ( diff --git a/etcd/fs/file.go b/etcd/fs/file.go index 0ef637bc..bbb5df36 100644 --- a/etcd/fs/file.go +++ b/etcd/fs/file.go @@ -30,8 +30,8 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - etcdutil "github.com/coreos/etcd/clientv3/clientv3util" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + etcdutil "go.etcd.io/etcd/clientv3/clientv3util" ) func init() { diff --git a/etcd/fs/fs.go b/etcd/fs/fs.go index 255befe8..2b305cc4 100644 --- a/etcd/fs/fs.go +++ b/etcd/fs/fs.go @@ -37,9 +37,9 @@ import ( "github.com/purpleidea/mgmt/etcd/interfaces" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - rpctypes "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" "github.com/spf13/afero" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + rpctypes "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes" ) func init() { diff --git a/etcd/helpers.go b/etcd/helpers.go index 38ee43fc..e740368c 100644 --- a/etcd/helpers.go +++ b/etcd/helpers.go @@ -27,10 +27,10 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - "github.com/coreos/etcd/mvcc/mvccpb" - etcdtypes "github.com/coreos/etcd/pkg/types" // generated package + etcd "go.etcd.io/etcd/clientv3" + pb "go.etcd.io/etcd/etcdserver/etcdserverpb" + "go.etcd.io/etcd/mvcc/mvccpb" + etcdtypes "go.etcd.io/etcd/pkg/types" // generated package ) // setEndpoints sets the endpoints on the etcd client if it exists. It diff --git a/etcd/interfaces/client.go b/etcd/interfaces/client.go index 8d15e1e8..85f6ba43 100644 --- a/etcd/interfaces/client.go +++ b/etcd/interfaces/client.go @@ -20,8 +20,8 @@ package interfaces import ( "context" - etcd "github.com/coreos/etcd/clientv3" // "clientv3" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" + etcd "go.etcd.io/etcd/clientv3" // "clientv3" + pb "go.etcd.io/etcd/etcdserver/etcdserverpb" ) // WatcherData is the structure of data passed to a callback from any watcher. diff --git a/etcd/membership.go b/etcd/membership.go index 7a7bcfa1..0038c9bc 100644 --- a/etcd/membership.go +++ b/etcd/membership.go @@ -26,10 +26,10 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - rpctypes "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes" - pb "github.com/coreos/etcd/etcdserver/etcdserverpb" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcd "go.etcd.io/etcd/clientv3" + rpctypes "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes" + pb "go.etcd.io/etcd/etcdserver/etcdserverpb" + etcdtypes "go.etcd.io/etcd/pkg/types" ) // addSelfState is used to populate the initial state when I am adding myself. @@ -161,7 +161,7 @@ func (obj *EmbdEtcd) memberRemove(ctx context.Context, memberID uint64) (*etcd.M // and doesn't watch events, it could miss changes if they happen rapidly. It // does not send results on the channel, since results could be captured in the // fn callback. It will send an error on the channel if something goes wrong. -// TODO: https://github.com/coreos/etcd/issues/5277 +// TODO: https://github.com/etcd-io/etcd/issues/5277 func (obj *EmbdEtcd) memberChange(ctx context.Context, fn func([]*pb.Member) error, d time.Duration) (chan error, error) { ch := make(chan error) go func() { diff --git a/etcd/methods.go b/etcd/methods.go index 94ecf65d..b6a2028b 100644 --- a/etcd/methods.go +++ b/etcd/methods.go @@ -24,9 +24,9 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - etcdutil "github.com/coreos/etcd/clientv3/clientv3util" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcd "go.etcd.io/etcd/clientv3" + etcdutil "go.etcd.io/etcd/clientv3/clientv3util" + etcdtypes "go.etcd.io/etcd/pkg/types" ) // volunteer offers yourself up to be a server if needed. If you specify a nil diff --git a/etcd/scheduler/scheduler.go b/etcd/scheduler/scheduler.go index 67edccb4..db2d3d92 100644 --- a/etcd/scheduler/scheduler.go +++ b/etcd/scheduler/scheduler.go @@ -28,8 +28,8 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcd "github.com/coreos/etcd/clientv3" - "github.com/coreos/etcd/clientv3/concurrency" + etcd "go.etcd.io/etcd/clientv3" + "go.etcd.io/etcd/clientv3/concurrency" ) const ( diff --git a/etcd/server.go b/etcd/server.go index 11371b09..42b69461 100644 --- a/etcd/server.go +++ b/etcd/server.go @@ -27,8 +27,8 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - "github.com/coreos/etcd/embed" - etcdtypes "github.com/coreos/etcd/pkg/types" + "go.etcd.io/etcd/embed" + etcdtypes "go.etcd.io/etcd/pkg/types" ) const ( @@ -143,7 +143,7 @@ func (obj *EmbdEtcd) runServer(newCluster bool, peerURLsMap etcdtypes.URLsMap) ( cfg.LCUrls = obj.ClientURLs cfg.APUrls = aPUrls cfg.ACUrls = aCUrls - cfg.StrictReconfigCheck = false // XXX: workaround https://github.com/coreos/etcd/issues/6305 + cfg.StrictReconfigCheck = false // XXX: workaround https://github.com/etcd-io/etcd/issues/6305 cfg.MaxTxnOps = DefaultMaxTxnOps cfg.InitialCluster = initialPeerURLsMap.String() // including myself! diff --git a/etcd/util.go b/etcd/util.go index 63a0d643..d78696ab 100644 --- a/etcd/util.go +++ b/etcd/util.go @@ -26,7 +26,7 @@ import ( "github.com/purpleidea/mgmt/util/errwrap" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcdtypes "go.etcd.io/etcd/pkg/types" ) // copyURL copies a URL. diff --git a/lib/main.go b/lib/main.go index 8695712a..6bd0f2ec 100644 --- a/lib/main.go +++ b/lib/main.go @@ -45,7 +45,7 @@ import ( "github.com/purpleidea/mgmt/util" "github.com/purpleidea/mgmt/util/errwrap" - etcdtypes "github.com/coreos/etcd/pkg/types" + etcdtypes "go.etcd.io/etcd/pkg/types" ) const ( diff --git a/spec.in b/spec.in index af7316d1..8afc55a0 100644 --- a/spec.in +++ b/spec.in @@ -30,7 +30,7 @@ A next generation config management prototype! # FIXME: in the future, these could be vendor-ed in mkdir -p vendor/ export GOPATH=`pwd`/vendor/ -go get github.com/coreos/etcd/client +go get github.com/etcd-io/etcd/clientv3 go get gopkg.in/yaml.v2 go get gopkg.in/fsnotify.v1 go get github.com/urfave/cli diff --git a/vendor/github.com/coreos/etcd b/vendor/github.com/coreos/etcd deleted file mode 160000 index 98d30842..00000000 --- a/vendor/github.com/coreos/etcd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 98d308426819d892e149fe45f6fd542464cb1f9d diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus index 0dafe0d4..c225b8c3 160000 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus @@ -1 +1 @@ -Subproject commit 0dafe0d496ea71181bf2dd039e7e3f44b6bd11a7 +Subproject commit c225b8c3b01faf2899099b768856a9e916e5087b diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway b/vendor/github.com/grpc-ecosystem/grpc-gateway index 8cc3a55a..ad529a44 160000 --- a/vendor/github.com/grpc-ecosystem/grpc-gateway +++ b/vendor/github.com/grpc-ecosystem/grpc-gateway @@ -1 +1 @@ -Subproject commit 8cc3a55af3bcf171a1c23a90c4df9cf591706104 +Subproject commit ad529a448ba494a88058f9e5be0988713174ac86 diff --git a/vendor/go.etcd.io/etcd b/vendor/go.etcd.io/etcd new file mode 160000 index 00000000..3cf2f69b --- /dev/null +++ b/vendor/go.etcd.io/etcd @@ -0,0 +1 @@ +Subproject commit 3cf2f69b5738fb702ba1a935590f36b52b18979b diff --git a/vendor/google.golang.org/grpc b/vendor/google.golang.org/grpc index 5b3c4e85..39e8a7b0 160000 --- a/vendor/google.golang.org/grpc +++ b/vendor/google.golang.org/grpc @@ -1 +1 @@ -Subproject commit 5b3c4e850e90a4cf6a20ebd46c8b32a0a3afcb9e +Subproject commit 39e8a7b072a67ca2a75f57fa2e0d50995f5b22f6