Skip to content

Removing self etcd member from cluster before shutdown#7372

Draft
makhov wants to merge 2 commits intok0sproject:mainfrom
makhov:etcd-self-removal
Draft

Removing self etcd member from cluster before shutdown#7372
makhov wants to merge 2 commits intok0sproject:mainfrom
makhov:etcd-self-removal

Conversation

@makhov
Copy link
Copy Markdown
Contributor

@makhov makhov commented Mar 31, 2026

Description

Currently we turn off the k0s node first and then try to remove it from cluster on the leader node, which is incorrect order since etcd is turned off and we lost a quorum.

In this change node give up leadership, removes itself and then shutdowns k0s.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@makhov makhov force-pushed the etcd-self-removal branch from dce5969 to a63fc47 Compare March 31, 2026 12:41
Signed-off-by: amakhov <amakhov@mirantis.com>
@makhov makhov force-pushed the etcd-self-removal branch 2 times, most recently from 71592b9 to 9a5f59b Compare March 31, 2026 15:10
Signed-off-by: amakhov <amakhov@mirantis.com>
@makhov makhov force-pushed the etcd-self-removal branch from 9a5f59b to 0bd0b08 Compare March 31, 2026 15:42
@makhov makhov added bug Something isn't working backport/release-1.34 PR that needs to be backported/cherrypicked to the release-1.34 branch backport/release-1.35 PR that needs to be backported/cherrypicked to the release-1.35 branch labels Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/release-1.34 PR that needs to be backported/cherrypicked to the release-1.34 branch backport/release-1.35 PR that needs to be backported/cherrypicked to the release-1.35 branch bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant