Brad Davidson
cf9ebb3259
Fail to validate server tokens that use bootstrap id/secret format
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2 years ago
Brad Davidson
d95980bba3
Lock bootstrap data with empty key to prevent conflicts
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2 years ago
Derek Nola
06d81cb936
Replace deprecated ioutil package ( #6230 )
...
* Replace ioutil package
* check integration test null pointer
* Remove rotate retries
Signed-off-by: Derek Nola <derek.nola@suse.com>
2 years ago
Luther Monson
9a849b1bb7
[master] changing package to k3s-io ( #4846 )
...
* changing package to k3s-io
Signed-off-by: Luther Monson <luther.monson@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
3 years ago
Brad Davidson
e4846c92b4
Move temporary etcd startup into etcd module
...
Reuse the existing etcd library code to start up the temporary etcd
server for bootstrap reconcile. This allows us to do proper
health-checking of the datastore on startup, including handling of
alarms.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
a1b800f0bf
Remove unnecessary copies of etcdconfig struct
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
2989b8b2c5
Remove unnecessary copies of runtime struct
...
Several types contained redundant references to ControlRuntime data. Switch to consistently accessing this via config.Runtime instead.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Brad Davidson
8ad7d141e8
Close etcd clients to avoid leaking GRPC connections
...
If you don't explicitly close the etcd client when you're done with it,
the GRPC connection hangs around in the background. Normally this is
harmelss, but in the case of the temporary etcd we start up on 2399 to
reconcile bootstrap data, the client will start logging errors
afterwards when the server goes away.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Derek Nola
bcb662926d
Secrets-encryption rotation ( #4372 )
...
* Regular CLI framework for encrypt commands
* New secrets-encryption feature
* New integration test
* fixes for flaky integration test CI
* Fix to bootstrap on restart of existing nodes
* Consolidate event recorder
Signed-off-by: Derek Nola <derek.nola@suse.com>
3 years ago
Brian Downs
adaeae351c
update bootstrap logic ( #4438 )
...
* update bootstrap logic resolving a startup bug and account for etcd
3 years ago
Brian Downs
34080b23b1
Copy old bootstrap buffer data for use during migration ( #4215 )
3 years ago
Derek Nola
feec44572d
Improve error message when using a "K10" prefixed token ( #4180 )
...
* Add new error message with a K10 prefixed secret token
Signed-off-by: dereknola <derek.nola@suse.com>
3 years ago
Brian Downs
ac7a8d89c6
Add ability to reconcile bootstrap data between datastore and disk ( #3398 )
3 years ago
galal-hussein
20a48734c2
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
7ebcc4b134
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
b4401296ec
replace error with warn in delete
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
2f82bfcf67
fix warning msg
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
b377839148
migrate old token key format
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
997ed7b9b4
simplifying the code
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
ad17292fa8
migrate empty string key properly
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
galal-hussein
a65e5b6466
Fix multiple bootstrap keys found
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Brad Davidson
246b378a27
Bump kine to resolve race condition and unrevisioned delete
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
3 years ago
Hussein Galal
136dddca11
Fix storing bootstrap data with empty token string ( #3422 )
...
* Fix storing bootstrap data with empty token string
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* delete node password secret after restoration
fixes to bootstrap key
vendor update
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix comment
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix typo
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* typos
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* Removing dynamic listener file after restoration
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* go mod tidy
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
3 years ago
Hussein Galal
73df65d93a
remove etcd data dir when etcd is disabled ( #3059 )
...
* remove etcd data dir when etcd is disabled
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix comment
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* use debug instead of info logs
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
4 years ago
Brian Downs
7c99f8645d
Have Bootstrap Data Stored in etcd at Completed Start ( #3038 )
...
* have state stored in etcd at completed start and remove unneeded code
4 years ago
Jacob Blain Christen
36230daa86
[migration k3s-io] update kine dependency ( #2568 )
...
rancher/kine ➡️ k3s-io/kine
Part of https://github.com/rancher/k3s/issues/2189
Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
4 years ago
Brad Davidson
703ba5cde7
Add a bunch of doc comments
...
Also change identical error messages to clarify where problems are
occurring.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
4 years ago
Darren Shepherd
a18d387390
Refactor clustered DB framework
5 years ago
Darren Shepherd
0ae20eb7a3
Support both http and db based bootstrap
5 years ago