Skip to content

Commit

Permalink
Merge pull request #1562 from thomasferrandiz/upgrade-etcd-v3
Browse files Browse the repository at this point in the history
Upgrade etcd client to v3
  • Loading branch information
manuelbuil authored May 26, 2022
2 parents 6c569c6 + b40d827 commit d11ce9c
Show file tree
Hide file tree
Showing 1,089 changed files with 216,474 additions and 6,123 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ K8S_VERSION=v1.22.3
GOARM=7

# These variables can be overridden by setting an environment variable.
TEST_PACKAGES?=pkg/ip subnet subnet/etcdv2 subnet/kube network backend
TEST_PACKAGES?=pkg/ip subnet subnet/etcd subnet/kube network backend
TEST_PACKAGES_EXPANDED=$(TEST_PACKAGES:%=github.com/flannel-io/flannel/%)
PACKAGES?=$(TEST_PACKAGES) network
PACKAGES_EXPANDED=$(PACKAGES:%=github.com/flannel-io/flannel/%)
Expand Down
2 changes: 1 addition & 1 deletion backend/route_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func routeAdd(route *netlink.Route, ipFamily int, addToRouteList, removeFromRout
// Same Dst and same Gw, keep it and do not attempt to add it.
log.Infof("Route to %v already exists, skipping.", route)
} else if err := netlink.RouteAdd(route); err != nil {
log.Errorf("Error adding route to %v", route)
log.Errorf("Error adding route to %v: %s", route, err)
return
}
_, err = netlink.RouteListFiltered(ipFamily, &netlink.Route{Dst: route.Dst}, netlink.RT_FILTER_DST)
Expand Down
10 changes: 5 additions & 5 deletions dist/functional-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ setup() {
}

teardown() {
echo "########## logs flannel-e2e-test-flannel1 for ##########" 2>&1
echo "########## logs for flannel-e2e-test-flannel1 container ##########" 2>&1
docker logs flannel-e2e-test-flannel1
docker rm -f flannel-e2e-test-flannel1 flannel-e2e-test-flannel2 flannel-e2e-test-flannel1-iperf flannel-host1 flannel-host2 > /dev/null 2>&1
docker run --rm $ETCDCTL_IMG etcdctl --endpoints=$etcd_endpt rm /coreos.com/network/config > /dev/null 2>&1
docker run --rm -e ETCDCTL_API=3 $ETCDCTL_IMG etcdctl --endpoints=$etcd_endpt rm /coreos.com/network/config > /dev/null 2>&1
}

write_config_etcd() {
Expand All @@ -59,7 +59,7 @@ write_config_etcd() {
flannel_conf="{ \"Network\": \"$FLANNEL_NET\", \"Backend\": { \"Type\": \"${backend}\" } }"
fi

while ! docker run --rm $ETCDCTL_IMG etcdctl --endpoints=$etcd_endpt set /coreos.com/network/config "$flannel_conf" >/dev/null
while ! docker run --rm -e ETCDCTL_API=3 $ETCDCTL_IMG etcdctl --endpoints=$etcd_endpt put /coreos.com/network/config "$flannel_conf" >/dev/null
do
sleep 0.1
done
Expand Down Expand Up @@ -181,12 +181,12 @@ test_multi() {
flannel_conf_vxlan='{"Network": "10.11.0.0/16", "Backend": {"Type": "vxlan"}}'
flannel_conf_host_gw='{"Network": "10.12.0.0/16", "Backend": {"Type": "host-gw"}}'

while ! docker run --rm $ETCD_IMG etcdctl --endpoints=$etcd_endpt set /vxlan/network/config "$flannel_conf_vxlan" >/dev/null
while ! docker run --rm -e ETCDCTL_API=3 $ETCD_IMG etcdctl --endpoints=$etcd_endpt put /vxlan/network/config "$flannel_conf_vxlan" >/dev/null
do
sleep 0.1
done

while ! docker run --rm $ETCD_IMG etcdctl --endpoints=$etcd_endpt set /hostgw/network/config "$flannel_conf_host_gw" >/dev/null
while ! docker run --rm -e ETCDCTL_API=3 $ETCD_IMG etcdctl --endpoints=$etcd_endpt put /hostgw/network/config "$flannel_conf_host_gw" >/dev/null
do
sleep 0.1
done
Expand Down
49 changes: 40 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ module github.com/flannel-io/flannel

go 1.17

replace (
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.2.0
google.golang.org/grpc => google.golang.org/grpc v1.29.0
)
replace github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.2.0

require (
github.com/Microsoft/hcsshim v0.9.2
Expand All @@ -20,18 +17,14 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/btree v1.0.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/joho/godotenv v0.0.0-20161216230537-726cc8b906e3
github.com/jonboulle/clockwork v0.2.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/tencentcloud/tencentcloud-sdk-go v1.0.67
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/vishvananda/netlink v1.2.0-beta
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
go.uber.org/zap v1.17.0 // indirect
golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
Expand All @@ -47,12 +40,47 @@ require (

)

require go.etcd.io/etcd/client/v3 v3.5.4

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.etcd.io/etcd/client/v2 v2.305.4 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.4 // indirect
go.etcd.io/etcd/raft/v3 v3.5.4 // indirect
go.etcd.io/etcd/server/v3 v3.5.4 // indirect
go.opentelemetry.io/contrib v0.20.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
go.opentelemetry.io/otel v0.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
go.opentelemetry.io/otel/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
go.opentelemetry.io/otel/trace v0.20.0 // indirect
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
)

require (
cloud.google.com/go v0.65.0 // indirect
github.com/BurntSushi/toml v0.4.1 // indirect
github.com/Microsoft/go-winio v0.4.17 // indirect
github.com/containerd/cgroups v1.0.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v0.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -73,10 +101,13 @@ require (
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.etcd.io/etcd/api/v3 v3.5.4
go.etcd.io/etcd/client/pkg/v3 v3.5.4
go.etcd.io/etcd/tests/v3 v3.5.4
go.opencensus.io v0.22.4 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20211202192323-5770296d904e // indirect
golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
Expand Down
Loading

0 comments on commit d11ce9c

Please sign in to comment.