Brad Davidson
90ce62ceaa
Defragment etcd datastore before clearing alarms
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-28 09:28:24 -07:00
Brad Davidson
cbf8cadb92
Ignore cluster membership errors when reconciling from temp etcd
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 9a48086524
)
2022-03-15 18:09:00 -07:00
Brad Davidson
7da7a00f8f
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>
(cherry picked from commit e4846c92b4
)
2022-03-15 18:09:00 -07:00
Brad Davidson
f55f09672e
Fix adding etcd-only node to existing cluster
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 5014c9e0e8
)
2022-03-15 18:09:00 -07:00
Brad Davidson
ee4c209df9
Remove unnecessary copies of etcdconfig struct
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit a1b800f0bf
)
2022-03-15 18:09:00 -07:00
Brad Davidson
58fe28b500
Fix cluster bootstrap test
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 54bb65064e
)
2022-03-15 18:09:00 -07:00
Brad Davidson
a18c38d63d
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>
(cherry picked from commit 2989b8b2c5
)
2022-03-15 18:09:00 -07:00
Derek Nola
6211a979a9
[Engine-1.21] Populate EtcdConfig in runtime from datastore when etcd is disabled ( #5230 )
...
* Populate EtcdConfig in runtime from datastore when etcd is disabled (#5222 )
Fixes issue with secrets-encrypt rotate not having any etcd endpoints
available on nodes without a local etcd server.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
* Revert naming to old Kine
Signed-off-by: Derek Nola <derek.nola@suse.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2022-03-08 12:07:18 -08:00
Brad Davidson
0a1f013f68
Fix handling of agent-token fallback to token
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-07 10:15:17 -08:00
Brad Davidson
4decce56a3
Fix use of agent creds for secrets-encrypt and config validate
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2022-01-06 14:17:03 -08:00
Brad Davidson
b38ef3a6aa
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>
(cherry picked from commit 8ad7d141e8
)
2021-12-22 12:41:36 -08:00
Brian Downs
5b0c1661f1
Update bootstrap logic to output all changed files on disk ( #4800 ) ( #4810 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-21 16:22:23 -07:00
Derek Nola
962113d4a0
[Engine-1.21] Fix cold boot and reconcilation on secondary servers ( #4754 )
...
* Fix cold boot restarts on secondary servers
Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-15 16:12:07 -08:00
Hussein Galal
9b67692414
Fix snapshot restoration on fresh nodes ( #4737 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-13 18:14:38 -07:00
Brian Downs
bc84ded38c
Resolve Bootstrap Migration Edge Case ( #4730 )
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-12-13 13:09:28 -07:00
Brian Downs
50b358048b
Resolve restore bootstrap ( #4704 ) ( #4717 )
2021-12-09 17:54:43 -07:00
Manuel Buil
b6e176f6a0
Check HA network parameters
...
Signed-off-by: Manuel Buil <mbuil@suse.com>
2021-12-08 14:42:20 +01:00
Derek Nola
e7fe71ea1e
[Engine-1.21] Secrets-encryption rotation ( #4656 )
...
* Backport secrets encrypt rotation
* Backport integration fixes for custom etcd args
Signed-off-by: Derek Nola <derek.nola@suse.com>
2021-12-07 21:55:00 -08:00
Hussein Galal
5153c527eb
[Engine-1.21] Add cert rotation command ( #4634 )
...
* Add cert rotation command (#4495 )
* Add cert rotation command
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* add function to check for dynamic listener file
Signed-off-by: Brian Downs <brian.downs@gmail.com>
* Add dynamiclistener cert rotation support
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes to the cert rotation
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix ci tests
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fixes to certificate rotation command
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* more fixes
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Co-authored-by: Brian Downs <brian.downs@gmail.com>
* Upgrade dynamic listener
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
Co-authored-by: Brian Downs <brian.downs@gmail.com>
2021-12-06 19:44:28 +02:00
Chris Kim
4e3a074c11
[engine-1.21] etcd snapshot functionality enhancements ( #4607 )
...
* etcd snapshot functionality enhancements (#4453 )
Signed-off-by: Chris Kim <oats87g@gmail.com>
* feat: add option to disable s3 over https
Signed-off-by: Chris Kim <oats87g@gmail.com>
Co-authored-by: Devin Buhl <devin.kray@gmail.com>
2021-11-29 13:30:12 -08:00
Chris Kim
381d086cf0
[engine-1.21] Add etcd extra args support for K3s ( #4470 )
...
* Add etcd extra args support for K3s
Signed-off-by: Chris Kim <oats87g@gmail.com>
* Add etcd custom argument integration test
Signed-off-by: Chris Kim <oats87g@gmail.com>
* Redux: Enable K3s integration test to run on existing cluster (#3905 )
* Made it possible to run int tests on existing cluster
Signed-off-by: dereknola <derek.nola@suse.com>
Signed-off-by: Chris Kim <oats87g@gmail.com>
Co-authored-by: Derek Nola <derek.nola@suse.com>
2021-11-11 19:53:20 -08:00
Brad Davidson
7364fe8cc6
Replace klog with non-exiting fork
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 29c8b238e5
)
2021-11-10 15:33:37 -08:00
Brian Downs
30c7723c03
[Engine-1.21] All bootstrap backport ( #4451 )
...
Add ability to reconcile bootstrap data between datastore and disk (#3398 )
2021-11-10 16:20:33 -07:00
Luther Monson
14cf963225
Update wrangler to v0.8.5 ( #4428 )
...
Required to support apiextensions.v1 as v1beta1 has been deleted. Also
update helm-controller and dynamiclistener to track wrangler versions.
Signed-off-by: Luther Monson <luther.monson@gmail.com>
Co-authored-by: Brad Davidson <brad.davidson@rancher.com>
2021-11-08 19:59:46 -07:00
Brad Davidson
7d0ecf3ab2
Revert "Backport bootstrap engine 1.21 ( #4314 )"
...
This reverts commits
c5a9154538
45c5d78cd7
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-10-27 13:46:00 -07:00
Brian Downs
c5a9154538
reset buffer after use ( #4279 ) ( #4330 )
2021-10-26 17:58:19 -07:00
Brian Downs
45c5d78cd7
Backport bootstrap engine 1.21 ( #4314 )
2021-10-25 13:03:30 -07:00
Hussein Galal
0c3f752620
[engine-1.21] Display cluster tls error only in debug mode ( #4125 )
...
* Display cluster tls error only in debug mode
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
* fix
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-10-13 01:13:59 +02:00
Brad Davidson
a6bbc65776
Add missing node name entry to apiserver SAN list
...
Also honor node-ip when adding the node address to the SAN list, instead
of hardcoding the autodetected IP address.
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-09-01 13:23:07 -07:00
galal-hussein
20a48734c2
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 22:42:05 +02:00
galal-hussein
7ebcc4b134
more fixes
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 22:39:44 +02:00
galal-hussein
b4401296ec
replace error with warn in delete
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 22:18:56 +02:00
galal-hussein
2f82bfcf67
fix warning msg
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 22:05:43 +02:00
galal-hussein
b377839148
migrate old token key format
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 20:59:57 +02:00
galal-hussein
997ed7b9b4
simplifying the code
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 19:56:19 +02:00
galal-hussein
ad17292fa8
migrate empty string key properly
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 19:21:38 +02:00
galal-hussein
a65e5b6466
Fix multiple bootstrap keys found
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-21 02:50:42 +02:00
Hussein Galal
a939decf01
fix a runtime core panic ( #3627 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-07-13 23:33:07 +02:00
Brian Downs
238dc2086e
prevent snapshot save when snapshots are disabled ( #3475 )
...
* prevent snapshot save when snapshots are disabled
2021-07-09 10:22:49 -07:00
Brad Davidson
cbfe673c43
Fix spelling to satisfy codespell check
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-07-01 13:29:03 -07:00
Brad Davidson
246b378a27
Bump kine to resolve race condition and unrevisioned delete
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-06-30 09:54:46 -07:00
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>
2021-06-22 22:42:34 +02:00
Brad Davidson
f6cec4e75d
Add kubernetes.default.svc to serving certs
...
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2021-06-08 12:55:20 -07:00
Brian Downs
afd506a595
fix possible race where bootstrap data might not save
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-06-04 15:05:47 -07:00
Hussein Galal
948295e8e8
Fix cluster restoration in rke2 ( #3295 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-05-11 00:06:33 +02:00
Hussein Galal
f410fc7d1e
Invoke cluster reset function when only reset flag is passed ( #3276 )
...
Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
2021-05-05 17:40:04 +02:00
Brian Downs
c5ad71ce0b
Collect and Store etcd Snapshots and Metadata ( #3239 )
...
* Add the ability to store local etcd snapshots and etcd snapshots stored in an S3 compatible object store in a ConfigMap.
2021-04-30 18:26:39 -07:00
Brian Downs
4a49b9e40b
delete nocluster file and remove build tag
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-04-07 12:16:28 -07:00
Brian Downs
400a632666
put etcd bootstrap save call in goroutine and update comment
...
Signed-off-by: Brian Downs <brian.downs@gmail.com>
2021-03-17 14:33:00 -07:00
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>
2021-03-16 18:14:43 +02:00