k3s/pkg
Malte Starostik 389cd740c8 Fix URL pruning when joining an etcd member
* 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>
(cherry picked from commit b23955e835)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-08-13 11:50:05 -07:00
..
agent Handle conntrack-related sysctls in supervisor agent setup 2021-05-19 01:04:17 -07:00
apiaddresses [release-1.19] Add disable components flags (#3023) 2021-03-05 00:28:56 +02:00
apis/k3s.cattle.io Update generated code 2019-10-30 19:08:26 -07:00
authenticator Fix up authenticator 2020-08-28 17:18:34 -07:00
bootstrap Refactor tokens, bootstrap, and cli args 2019-10-30 19:06:49 -07:00
cli Upgrade kine 2021-07-19 22:41:50 +02:00
clientaccess Upgrade kine 2021-07-19 22:41:50 +02:00
cloudprovider Initial Logging Output Update (#2246) 2020-10-28 16:40:15 -07:00
cluster Fix multiple bootstrap keys found 2021-07-21 23:00:23 +02:00
codegen Add support for disabling all staged content 2020-09-14 14:21:37 -07:00
configfilearg All arguments should be of the form --k=v so that bool flags will work 2020-09-03 16:25:35 -07:00
containerd Continued refactoring 2019-01-11 21:52:30 -07:00
ctr Build & enable ctr with k3s server 2019-06-30 09:30:25 -07:00
daemons Upgrade kine 2021-07-19 22:41:50 +02:00
datadir Make program name a variable to be changed at compile time 2020-06-06 16:39:41 -07:00
dataverify Add file verification for data directory 2020-10-28 16:40:15 -07:00
deploy Bump helm-controller to v0.10.2 2021-08-05 09:36:13 -07:00
etcd Fix URL pruning when joining an etcd member 2021-08-13 11:50:05 -07:00
flock Add Release function for flock 2020-10-28 16:40:15 -07:00
generated Update go.mod for k8s 1.19 2020-08-28 17:18:31 -07:00
kubectl Make kubeconfig not world readable and issue warning with kubectl wrapper 2019-05-09 00:54:52 +02:00
netutil Initial Logging Output Update (#2246) 2020-10-28 16:40:15 -07:00
node Initial Logging Output Update (#2246) 2020-10-28 16:40:15 -07:00
nodeconfig add etcd s3 secret and access key flags and env vars to secret data 2021-04-12 15:48:53 -07:00
passwd get build on windows and get api_server to work 2020-02-22 23:17:59 -08:00
rootless Fix handling of TLS configuration args 2020-08-18 16:44:10 -07:00
rootlessports Initial Logging Output Update (#2246) 2020-10-28 16:40:15 -07:00
server Upgrade kine 2021-07-19 22:41:50 +02:00
servicelb Bump helm-controller to v0.10.2 2021-08-05 09:36:13 -07:00
static Add support for disabling all staged content 2020-09-14 14:21:37 -07:00
token Refactor tokens, bootstrap, and cli args 2019-10-30 19:06:49 -07:00
untar Continued refactoring 2019-01-11 21:52:30 -07:00
util fix formatting 2020-02-23 00:48:26 -08:00
version remove hard coded value 2020-07-09 11:20:06 -07:00