k3s/pkg
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
..
agent Wrap context with lease before importing images 2021-08-04 10:22:19 -07:00
apiaddresses remove duplicated func GetAddresses 2021-03-31 14:23:05 -07:00
apis/k3s.cattle.io Update generated code 2019-10-30 19:08:26 -07:00
authenticator Introduction of Integration Tests (#3695) 2021-07-26 09:59:33 -07:00
bootstrap Refactor tokens, bootstrap, and cli args 2019-10-30 19:06:49 -07:00
cgroups Initial windows support for agent (#3375) 2021-06-01 12:29:46 -07:00
cli Use New Image Names (#3749) 2021-08-06 16:14:58 -07:00
clientaccess Introduction of Integration Tests (#3695) 2021-07-26 09:59:33 -07:00
cloudprovider Add support for dual-stack Pod/Service CIDRs and node IP addresses (#3212) 2021-04-21 15:56:20 -07:00
cluster more fixes 2021-07-21 22:42:05 +02:00
codegen Add support for disabling all staged content 2020-09-14 14:21:37 -07:00
configfilearg Introduction of Integration Tests (#3695) 2021-07-26 09:59:33 -07:00
containerd Initial windows support for agent (#3375) 2021-06-01 12:29:46 -07:00
ctr Build & enable ctr with k3s server 2019-06-30 09:30:25 -07:00
daemons Updated the code to use GetNetworkByName and tweaked logic. 2021-08-10 13:53:08 -07: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-06 10:29:27 -07:00
deploy Use New Image Names (#3749) 2021-08-06 16:14:58 -07:00
etcd Fix URL pruning when joining an etcd member (#3832) 2021-08-12 15:59:04 -07:00
flock Add Release function for flock 2020-10-06 10:29:27 -07:00
generated Update go.mod for k8s 1.19 2020-08-28 17:18:31 -07:00
kubectl Update Kubernetes to v1.20.0-k3s1 2020-12-08 22:51:34 -08:00
netutil Initial Logging Output Update (#2246) 2020-09-21 09:56:03 -07:00
node Use secrets for node-passwd entries and cleanup 2020-11-05 09:48:53 -07:00
nodeconfig Introduction of Integration Tests (#3695) 2021-07-26 09:59:33 -07:00
nodepassword Introduction of Integration Tests (#3695) 2021-07-26 09:59:33 -07:00
passwd Use secrets for node-passwd entries and cleanup 2020-11-05 09:48:53 -07:00
rootless rootless: allow kernel.dmesg_restrict=1 2021-03-24 01:03:14 -07:00
rootlessports Initial Logging Output Update (#2246) 2020-09-21 09:56:03 -07:00
server Sync DisableKubeProxy into control struct 2021-07-30 12:26:50 -07:00
servicelb Add system-default-registry support and remove shared code (#3285) 2021-05-10 15:58:41 -07:00
static Add system-default-registry support and remove shared code (#3285) 2021-05-10 15:58:41 -07:00
token Refactor tokens, bootstrap, and cli args 2019-10-30 19:06:49 -07:00
untar Limit zstd decoder memory 2021-02-17 11:48:03 -08:00
util Moved testing utils into tests directory. Improved gotests template. (#3805) 2021-08-10 11:13:26 -07:00
version remove hard coded value 2020-07-09 11:20:06 -07:00