-
Notifications
You must be signed in to change notification settings - Fork 185
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
Use Required Pod anti affinity if Active MDS is not more than 1 #3035
Use Required Pod anti affinity if Active MDS is not more than 1 #3035
Conversation
When Active MDS is 1, there would be 2 mds pods & we want them to be scheduled on different nodes always. So we use the required pod anti-affinity. If Active MDS are more than 1 then in a 3 node cluster scheduling issues would be there, so we switch to using preferred anti-affinity. Signed-off-by: Malay Kumar Parida <[email protected]>
TestingWhen activeMetadataServers count is not more than 1
When activeMetadataServers count is more than 1
|
/cc @parth-gr |
@malayparida2000: GitHub didn't allow me to request PR reviews from the following users: parth-gr. Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs. 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-sigs/prow repository. |
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.
lgtm
@parth-gr: changing LGTM is restricted to collaborators 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-sigs/prow repository. |
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.
cc @BlaineEXE
}, | ||
// if active MDS number is more than 1 then Preferred and if it is 1 then Required pod anti-affinity is set | ||
mdsWeightedPodAffinity := defaults.GetMdsWeightedPodAffinityTerm(100, generateNameForCephFilesystem(sc)) | ||
if sc.Spec.ManagedResources.CephFilesystems.ActiveMetadataServers > 1 { |
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.
@malayparida2000 can we also list the total nodes and see if the storage nodes are more than a number of pods?
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.
@parth-gr I didn't do that as this fix needs to be backported till 4.15 & I don't want to add client list operations in backports. We can implement the get node & decision based on that may be in 4.19.
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.
@malayparida2000 the fix for using filesystem name as key for antiaffinity is even not backported, so there is already being a lot of changes
So can have this in 4.18?
And for backports we can have seperate PR in 4.17
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.
Went through the code a bit. To list & get odf labeled nodes We will need a change in the getPlacement() funcs signature as it would now need the client. This would require a lot of changes in the codebase especially the unit tests. Considering tomorrow is the RC I don't think it's achievable by tomorrow.
@parth-gr: changing LGTM is restricted to collaborators 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-sigs/prow repository. |
I think this is a good low-effort way to soften the issue. I think that this might not solve the full issue wholistically, but as Malay said, we can consider that for 4.19+ |
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.
lgtm, @malayparida2000 please open a follow up jira bug to track the decision we made we would be doing in future.
@parth-gr: changing LGTM is restricted to collaborators 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-sigs/prow repository. |
@BlaineEXE Can you please approve this, Nitin is out sick. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BlaineEXE, malayparida2000, parth-gr 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 |
9edaa53
into
red-hat-storage:main
/cherry-pick release-4.18 |
@malayparida2000: new pull request created: #3036 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-sigs/prow repository. |
When Active MDS is 1, there would be 2 mds pods & we want them to be scheduled on different nodes always. So we use the required pod anti-affinity. If Active MDS are more than 1 then in a 3 node cluster scheduling issues would be there, so we switch to using preferred anti-affinity.