Commit 6644fca
committed
fix: etcd client leak in the (legacy) Upgrade API
This doesn't affect new upgrade API.
There were two leaks in the validate path, usually they are harmless, as
the Upgrade triggers a reboot, so a couple of leaking clients doesn't
matter, but if they API is called repeatedly (and it fails to upgrade),
the leak accumulates until `etcd` container runs out of file descriptor,
eventually preventing new connections to `etcd` from being established.
Also put the etcd pre-checks under the `!preserve` condition (means the
API requests wipe). The wipe behavior was disabled by default for a long
time, and all etcd pre-checks only make sense if the wipe is called,
otherwise upgrade doesn't affect etcd membership in any way.
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>1 parent 4759dc2 commit 6644fca
2 files changed
Lines changed: 5 additions & 1 deletion
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
| 534 | + | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
0 commit comments