-
Notifications
You must be signed in to change notification settings - Fork 105
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
NO-JIRA: Drop TuneD profiles with the same name and different content #1216
base: master
Are you sure you want to change the base?
NO-JIRA: Drop TuneD profiles with the same name and different content #1216
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jmencak 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 |
pkg/operator/profilecalculator.go
Outdated
MCLabels map[string]string | ||
NodePoolName string | ||
Operand tunedv1.OperandConfig | ||
TuneDProfileConflict []string |
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.
Is storing this really necessary? The AllProfiles list already has this information and it is enough to just report the duplicate names in the status I'd say?
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.
You'd have to go through the AllProfiles list again when calculating the status and check their content. Same content is not a problem and I don't think we should make co/node-tuning degraded. The "cache" is an optimization. Data vs. CPU cycles. I'm for saving CPU cycles.
An example of creating duplicate profiles with conflicting content:
Profile 2
|
pkg/operator/status.go
Outdated
@@ -308,6 +308,13 @@ func (c *Controller) computeStatus(tuned *tunedv1.Tuned, conditions []configv1.C | |||
availableCondition.Message = fmt.Sprintf("%v/%v Profiles failed to be applied", numDegradedProfiles, len(profileList)) | |||
} | |||
|
|||
if len(c.tunedProfileConflict) > 0 { |
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.
I know this is cheaper than doing the count over AllProfiles here, but using the direct value instead of a precomputed cache might be easier to maintain.
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.
Yes, as I said above, it is cheaper.
8658666
to
fad99f9
Compare
@jmencak: This pull request explicitly references no jira issue. 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 openshift-eng/jira-lifecycle-plugin repository. |
/hold |
It is possible to create Tuned CRs with TuneD profiles of the same name. This is problematic when the duplicate TuneD profiles have different content. This causes periodic extraction of TuneD profiles and can lead to TuneD restarts. This change drops all instances of duplicate TuneD profiles and is a partial fix for OCPBUGS-44559.
fad99f9
to
47bacc5
Compare
/unhold |
@jmencak: all tests passed! 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-sigs/prow repository. I understand the commands that are listed here. |
It is possible to create Tuned CRs with TuneD profiles of the same name.
This is problematic when the duplicate TuneD profiles have different
content. This causes periodic extraction of TuneD profiles and can lead
to TuneD restarts.
This change drops all instances of duplicate TuneD profiles and is a partial
fix for OCPBUGS-44559.