Skip to content
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: Report duplicate profiles as ERRORs #864

Merged

Conversation

jmencak
Copy link
Contributor

@jmencak jmencak commented Dec 1, 2023

In the past, duplicate profiles were being report as WARNINGs only. Increase seriousness of this fact, so that it helps the users to fix their configuration issues.

@jmencak
Copy link
Contributor Author

jmencak commented Dec 1, 2023

/cc @MarSik

Copy link
Contributor

openshift-ci bot commented Dec 1, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2023
@@ -133,7 +133,7 @@ func tunedRenderedProfiles(tuned *tunedv1.Tuned, m map[string]tunedv1.TunedProfi
if *v.Data == *existingProfile.Data {
klog.Infof("duplicate profiles names %s but they have the same contents", *v.Name)
} else {
klog.Warningf("WARNING: duplicate profiles named %s with different contents", *v.Name)
klog.Errorf("ERROR: duplicate profiles named %s with different contents!", *v.Name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is here a way to print the Tuned object name the profile comes from too? And maybe the profile that was selected (+ its parent Tuned) at the end of the loop?

Copy link
Contributor Author

@jmencak jmencak Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is here a way to print the Tuned object name the profile comes from too?

Yes. I added it to the PR.

And maybe the profile that was selected (+ its parent Tuned) at the end of the loop?

Not sure what exactly do you mean, but I'm sensing it would require larger code changes and hopefully the above is sufficient.

In the past, duplicate profiles were being report as WARNINGs only.
Increase seriousness of this fact, so that it helps the users to fix
their configuration issues.
@jmencak jmencak force-pushed the 4.15-duplicate-profile-error branch from 8a50b4d to a5af660 Compare December 1, 2023 17:13
@ffromani
Copy link
Contributor

ffromani commented Dec 4, 2023

I'm fine with the idea here. Do we report or want to report this condition as Degraded condition in the tuned object? If we don't do already, it's totally new PR material.

@jmencak
Copy link
Contributor Author

jmencak commented Dec 4, 2023

I'm fine with the idea here. Do we report or want to report this condition as Degraded condition in the tuned object? If we don't do already, it's totally new PR material.

Thank you for the review. 'Degraded' is reported in profiles.tuned.openshift.io, but not for this particular situation. We might in the future, but as you say, not in this PR (added to my TODO list).

@MarSik , please see if the changes are sufficient, so that we can get this in 4.15.0. Thank you!

@ffromani
Copy link
Contributor

ffromani commented Dec 4, 2023

/lgtm
/hold

waiting for second opinion from @MarSik

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2023
@MarSik
Copy link
Contributor

MarSik commented Dec 4, 2023

/hold cancel

I would also like to see a Tuned.Status.Conditions improvement, but this is a good step forward.

@MarSik
Copy link
Contributor

MarSik commented Dec 4, 2023

/lgtm

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2023
@jmencak jmencak changed the title Report duplicate profiles as ERRORs NO-JIRA: Report duplicate profiles as ERRORs Dec 4, 2023
@openshift-ci-robot
Copy link
Contributor

@jmencak: This pull request explicitly references no jira issue.

In response to this:

In the past, duplicate profiles were being report as WARNINGs only. Increase seriousness of this fact, so that it helps the users to fix their configuration issues.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 4, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 81b7b9d and 2 for PR HEAD a5af660 in total

Copy link
Contributor

openshift-ci bot commented Dec 4, 2023

@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.

@openshift-merge-bot openshift-merge-bot bot merged commit e9fa899 into openshift:master Dec 4, 2023
14 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-node-tuning-operator-container-v4.15.0-202312041611.p0.ge9fa899.assembly.stream for distgit cluster-node-tuning-operator.
All builds following this will include this PR.

@jmencak jmencak deleted the 4.15-duplicate-profile-error branch December 4, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants