k3s/pkg/etcd
Malte Starostik b23955e835
Fix URL pruning when joining an etcd member (#3832)
* Fix URL pruning when joining an etcd member

Problem:
Existing member clientURLs were checked if they contain the joining
node's IP. In some edge cases this would prune valid URLs when the
joining IP is a substring match of the only existing member's IP.
Because of this, it was impossible to e.g. join 10.0.0.2 to an existing
node that has an IP of 10.0.0.2X or 10.0.0.2XX:

level=fatal msg="starting kubernetes: preparing server: start managed database:
joining etcd cluster: etcdclient: no available endpoints"

Solution:
Fixed by properly parsing the URLs and comparing the IPs for equality
instead of substring match.

Signed-off-by: Malte Starostik <info@stellaware.de>
2021-08-12 15:59:04 -07:00
..
controller.go remove etcd member if disable etcd is passed 2021-03-01 23:50:50 +02:00
etcd_int_test.go Added locking system for integration tests (#3820) 2021-08-10 16:22:12 -07:00
etcd_test.go Moved testing utils into tests directory. Improved gotests template. (#3805) 2021-08-10 11:13:26 -07:00
etcd.go Fix URL pruning when joining an etcd member (#3832) 2021-08-12 15:59:04 -07:00
etcdproxy.go Handle loadbalancer port in TIME_WAIT 2021-03-08 17:05:25 -08:00
s3.go Prevent snapshot commands from creating empty snapshot directory (#3783) 2021-08-09 09:04:18 -07:00