-
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
Remove duplicate placements for rook-ceph dameons due to specifying with all & specific key #2973
base: main
Are you sure you want to change the base?
Remove duplicate placements for rook-ceph dameons due to specifying with all & specific key #2973
Conversation
Rook creates some rook-ceph daemon's placement by merging the "all" and specific key placements. The OCS operator specifies the default OCS tolerations and node affinity in both the "all" key and the specific key leading to duplicated placements. To avoid this, skip specifying the default OCS tolerations and node affinity with the specific key. Signed-off-by: Malay Kumar Parida <[email protected]>
5e55de8
to
b79310d
Compare
Signed-off-by: Malay Kumar Parida <[email protected]>
@travisn @parth-gr After looking at the possible sollutions & how it works I still think the fix has to come on rook side only. As ocs-operator supports specification of placement on the storagecluster CR at spec.placement. Even if we resolve the duplicate specification by ocs-operator. A customer can still end up specifiying same tolerations ones at the "all" key and again with a specific key like "mgr", And we will end up having duplicates. As rook is the last place which creates the pod spec that should be the ideal place to remove the duplicates if any. |
Test results-
osd-prepare
|
mgr
mon
|
mds
nfs
|
exporter
crashcollector
|
@travisn any idea why exporter & crashcollector do not have any node affinities on them? Inspite of node affinities being specified with the 'all' key. |
Yes even I saw that we have mechanism already to remove duplicate env variables https://github.com/rook/rook/blob/c33f6bda7bbe5af1ccb56d2573d86fba25244dde/pkg/operator/k8sutil/pod.go#L377 |
@malayparida2000 The crash collector and exporter have node selectors to assign them to specific nodes, based on which nodes have other ceph daemons running. Rook basically calculates their node placement instead of relying on the node affinity settings. But those daemons should inherit the tolerations. |
If OCS operator owns fixing its own duplicates, then in case the customer adds the placement that is duplicate, if the alerts bother them, then they should know to remove the duplicates that they caused, right? In any case, everything still works, it's just a recommendation to avoid the duplication and very low impact. Merging complex types automatically could be prone to errors so we want to avoid that complexity. |
With this PR as you can see from the taste results I have pasted, there are no longer duplicates on daemons's placement due to ocs-operator. |
@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. |
@travisn @malayparida2000 But the duplicate are only taken by osd prepare pod PS: I got the reason, the osd and mons, etc are deployments so if we apply duplicate in deployment it will create a pod with only unique once, but the prepare-pod is a job which directly has pod spec, so that's why it still kept the duplicates |
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.
looks good to me,
/hold for @travisn review
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: iamniting, 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 |
Rook creates the rook-ceph daemon's placement by merging the "all" and specific key placements. The OCS operator specifies the default OCS tolerations and node affinity in both the "all" key and the specific key leading to duplicated placements. To avoid this, skip specifying the default OCS tolerations and node affinity with the specific key.