k3s/pkg
Brad Davidson 6d28abd1f4 Fix race condition in tunnel server startup
Several places in the code used a 5-second retry loop to wait on
Runtime.Core to be set. This caused a race condition where OnChange
handlers could be added after the Wrangler shared informers were already
started. When this happened, the handlers were never called because the
shared informers they relied upon were not started.

Fix that by requiring anything that waits on Runtime.Core to run from a
cluster controller startup hook that is guaranteed to be called before
the shared informers are started, instead of just firing it off in a
goroutine that retries until it is set.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c44d33d29b)
2023-05-10 15:18:54 -07:00
..
agent Improve egress selector handling on agentless servers 2023-05-10 15:18:54 -07:00
apis/k3s.cattle.io Create CRDs with schema 2023-05-10 15:18:54 -07:00
authenticator Replace deprecated ioutil package (#6230) 2022-10-07 17:36:57 -07:00
bootstrap Replace deprecated ioutil package (#6230) 2022-10-07 17:36:57 -07:00
cgroups Replace deprecated ioutil package (#6230) 2022-10-07 17:36:57 -07:00
cli Improve egress selector handling on agentless servers 2023-05-10 15:18:54 -07:00
clientaccess Add support for kubeadm token and client certificate auth 2023-02-10 09:33:55 -08:00
cloudprovider [release-1.25] Update klipper lb and helm-controller (#7240) 2023-04-06 22:17:21 +02:00
cluster Fix race condition in tunnel server startup 2023-05-10 15:18:54 -07:00
codegen [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
configfilearg [Release-1.25] CLI + Config Enhancement (#7404) 2023-05-02 14:03:59 -07:00
containerd Bump golang to 1.18.1 2022-05-11 14:39:07 -07:00
crd Create CRDs with schema 2023-05-10 15:18:54 -07:00
ctr Build & enable ctr with k3s server 2019-06-30 09:30:25 -07:00
daemons Fix race condition in tunnel server startup 2023-05-10 15:18:54 -07:00
data code changes to drop the vendor dir 2021-12-21 14:23:38 -07:00
datadir [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
dataverify Add file verification for data directory 2020-10-06 10:29:27 -07:00
deploy go generate 2023-05-10 15:18:54 -07:00
etcd Lock bootstrap data with empty key to prevent conflicts 2023-04-05 16:29:13 -07:00
flock Update golangci-lint to 1.45.2 2022-04-13 14:48:42 -07:00
generated Create CRDs with schema 2023-05-10 15:18:54 -07:00
kubeadm Add support for `k3s token` command 2023-02-10 09:33:55 -08:00
kubectl Track upstream changes to kubectl command execution 2022-03-16 17:19:18 -07:00
node [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
nodeconfig Fix access to hostNetwork port on NodeIP when egress-selector-mode=agent 2023-02-10 09:43:53 -08:00
nodepassword Replace deprecated ioutil package (#6230) 2022-10-07 17:36:57 -07:00
passwd [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
rootless Address nits from self-review 2022-11-21 15:23:30 -08:00
rootlessports [master] changing package to k3s-io (#4846) 2022-03-02 15:47:27 -08:00
secretsencrypt Ignore value conflicts when reencrypting secrets (#6919) 2023-02-08 12:14:22 -08:00
server Fix race condition in tunnel server startup 2023-05-10 15:18:54 -07:00
static go generate 2023-05-10 15:18:54 -07:00
token Replace deprecated ioutil package (#6230) 2022-10-07 17:36:57 -07:00
untar Bump wharfie to v0.5.1 and use shared decompression code 2021-12-07 12:50:57 -08:00
util Migrate netutil methods into /utils/net.go 2023-05-05 07:24:22 +02:00
version remove hard coded value 2020-07-09 11:20:06 -07:00