-
Notifications
You must be signed in to change notification settings - Fork 116
Bug 2074062: Remove TuneD profiles no longer used #341
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
Bug 2074062: Remove TuneD profiles no longer used #341
Conversation
|
@jmencak: This pull request references Bugzilla bug 2074062, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (liqcui@redhat.com), skipping review request. 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. |
|
/assign @dagrayvid |
|
[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 |
|
@jmencak: This pull request references Bugzilla bug 2074062, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (liqcui@redhat.com), skipping review request. 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. |
1 similar comment
|
@jmencak: This pull request references Bugzilla bug 2074062, which is valid. 3 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (liqcui@redhat.com), skipping review request. 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. |
|
/retest |
pkg/tuned/controller.go
Outdated
| change, extracted, recommendedProfileDeps, err := profilesExtract(profiles) | ||
| if err != nil { | ||
| return change, err | ||
| } | ||
|
|
||
| // Deal with TuneD profiles absent from Tuned CRs, but still present in /etc/tuned/<profile>/ the recommended profile depends on. | ||
| for profile := range recommendedProfileDeps { | ||
| if !extracted[profile] { |
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.
Thanks @jmencak. Overall the code makes sense, just one idea for improvement:
I find the name of extracted a bit confusing here because the "problem" is that the profile IS extracted (or was), and because it was extracted, we need to delete it. However, we are checking if it is !extracted and if !extracted, we delete the corresponding profile dir.
I think renaming the variable to something like newlyExtracted or extractedNew might clarify things.
Similarly the name recommendedProfileDeps sounds like the list of profiles that we would need to keep in /etc/tuned/, but it refers to the current (soon to be previous?) recommended-profile-dependencies. Maybe there is a better name we can come up with? I'm probably okay with keeping this as-is, if we make it clear that extracted is referring to the latest (future) needed dependencies.
Hope that makes sense, open to discussing further.
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.
Thank you for the suggestions, David. I've replaced s/extracted/extractedNew/ . As for recommendedProfileDeps I do not have a better name. :/ It is one of the hardest problems in computer science. :)
TuneD profiles are extracted into all operands on every Tuned CR change. After their deletion in the CR, they were not removed from the operand's filesystems. In the past, it was not necessary to remove these profiles. This changed with the introduction of conditional profile loading into TuneD. As NTO's Cloud-specific profiles rely on conditional profile loading, this change makes sure all TuneD profiles the current recommended profile depends on are removed from /etc/tuned/<profile>/ once the same TuneD <profile> is no longer defined in any of Tuned CRs. Resolves rhbz#2074062.
|
Thanks for the change. /lgtm |
|
@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/test-infra repository. I understand the commands that are listed here. |
|
@jmencak: All pull requests linked via external trackers have merged: Bugzilla bug 2074062 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. |
TuneD profiles are extracted into all operands on every Tuned CR change. After their deletion in the CR, they were not removed from the operand's filesystems. In the past, it was not necessary to remove these profiles. This changed with the introduction of conditional profile loading into TuneD. As NTO's Cloud-specific profiles rely on conditional profile loading, this change makes sure all TuneD profiles the current recommended profile depends on are removed from /etc/tuned/<profile>/ once the same TuneD <profile> is no longer defined in any of Tuned CRs. Resolves rhbz#2074062. Co-authored-by: Jiri Mencak <jmencak@users.noreply.github.com>
TuneD profiles are extracted into all operands on every Tuned CR change. After their deletion in the CR, they were not removed from the operand's filesystems. In the past, it was not necessary to remove these profiles. This changed with the introduction of conditional profile loading into TuneD. As NTO's Cloud-specific profiles rely on conditional profile loading, this change makes sure all TuneD profiles the current recommended profile depends on are removed from /etc/tuned/<profile>/ once the same TuneD <profile> is no longer defined in any of Tuned CRs. Resolves rhbz#2074062. Co-authored-by: Jiri Mencak <jmencak@users.noreply.github.com>
TuneD profiles are extracted into all operands on every Tuned CR change. After their deletion in the CR, they were not removed from the operand's filesystems. In the past, it was not necessary to remove these profiles. This changed with the introduction of conditional profile loading into TuneD.
As NTO's Cloud-specific profiles rely on conditional profile loading, this change makes sure all TuneD profiles the current recommended profile depends on are removed from
/etc/tuned/<profile>/once the same TuneD is no longer defined in any of Tuned CRs.Resolves rhbz#2074062.