New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-1348: Fix deleting machine affecting new machine failure domain #106
Conversation
@RadekManak: This pull request references Jira Issue OCPBUGS-1348, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/jira refresh |
@RadekManak: This pull request references Jira Issue OCPBUGS-1348, which is invalid:
Comment In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/jira refresh |
@RadekManak: This pull request references Jira Issue OCPBUGS-1348, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
if pointer.StringDeref(machine.Status.Phase, "") == "Deleting" { | ||
continue | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the deleting machine is the only machine in the index, are we sure this is what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the case in the test. Without this change, the deleting machine gets matched to index 0 then indexes 1 and 2 get populated from base because failure domain "us-east-1a" is fully represented in deleting machine at index 0
With this change, it assigns index 1 to "us-east-1a" because there is a ready machine there. This swaps the failure domain in indexes 0 and 1 causing the candidate for index 0 to be "us-east-1b". Index 0 gets assigned "us-east-1b" because it is empty. Index 2 gets assigned "us-east-1c" because failure domain "us-east-1a" in that index is overrepresented.
This problem occurs only in the OnDelete strategy because the user deleted a machine that was considered healthy. In fact, they were all equally healthy, but the algorithm had to choose which ones are the superfluous.
655afc8
to
843cc27
Compare
Fixed the linter errors. |
Have reviewed the bug and the code again and I can see why this makes sense Good work here understanding the issue! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoelSpeed The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@RadekManak: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/override ci/prow/e2e-aws-serial Known OVN failure, sending alerts because of 4 masters |
@JoelSpeed: Overrode contexts on behalf of JoelSpeed: ci/prow/e2e-aws-serial In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@RadekManak: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-1348 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
When failure domains are mapped onto indexes, we first try to assign failure domains of machines to indexes and after that we populate empty indexes with remaining failure domains. We iterate over indexes in ascending order to be consistent.
This caused a bug if you deleted a machine on index 0. The first thing that would happen is it would notice the deleting machine on index 0 and assign its failure domain to the index. Even if there were more machines with that failure domain over the maximum allowed.
To fix this, I have removed machines in deleting phase from affecting failure domain mapping.