Skip to content

Conversation

@ewoutp
Copy link
Contributor

@ewoutp ewoutp commented Jun 4, 2018

This PR extends #151

This PR adds cleaning up of members (and their Pods & PVCs) that are no longer part of a cluster.
When /_admin/cluster/health no longer shows the member ID, it is subject to removal.
To do this, a new condition is added for members that records if the member was at least once reported as member of the cluster. Without this, the member could be deleted before it even has a chance to join the cluster.

@ewoutp ewoutp added the 9 WIP label Jun 4, 2018
@ewoutp ewoutp requested a review from matthewvon June 5, 2018 10:15
// Member is (still) found, skip it
if m.Conditions.Update(api.ConditionTypeMemberOfCluster, true, "", "") {
list.Update(m)
if err := r.context.UpdateStatus(status); err != nil {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this fails on one server, would that lead to subsequent server in the ForeachServerGroup not getting their last access time updated ... maybe leading to false delete?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, other member can be affected.
It would mean that other members may late with recording their "I'm a member of the cluster" state. If anything, they will be removed later, not earlier.

@ewoutp ewoutp merged commit 265397d into master Jun 6, 2018
@ewoutp ewoutp deleted the bugfix/cleanup-long-terminating-stateful-pods branch June 6, 2018 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants