-
Notifications
You must be signed in to change notification settings - Fork 414
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
OCPBUGS-51009: OSUpdateStarted event should only be emitted on actual OS updates #4864
base: master
Are you sure you want to change the base?
Conversation
@djoshy: This pull request references Jira Issue OCPBUGS-51009, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: The bug has been updated to refer to the pull request using the external bug tracker. 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. |
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
I think the changes make sense. These events really shouldn't be canonical for OS upgrades, but I guess for now they work for catching CI flakes like this, so it somewhat helps
// We have at least one customer that removes the pull secret from the cluster to "shrinkwrap" it for distribution and we want | ||
// to make sure we don't break that use case, but realtime kernel update and extensions update always ran | ||
// if they were in use, so we also need to preserve that behavior. | ||
// https://issues.redhat.com/browse/OCPBUGS-4049 | ||
if mcDiff.osUpdate || mcDiff.extensions || mcDiff.kernelType || mcDiff.kargs || | ||
canonicalizeKernelType(newConfig.Spec.KernelType) == ctrlcommon.KernelTypeRealtime || | ||
canonicalizeKernelType(newConfig.Spec.KernelType) == ctrlcommon.KernelType64kPages || | ||
len(newConfig.Spec.Extensions) > 0 { | ||
canonicalizeKernelType(newConfig.Spec.KernelType) == ctrlcommon.KernelType64kPages { |
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.
Hmm, the best I can interpret the intent was that on upgrades, the extensions packages should also be automatically updating with the OS version, that said, I think this logic would still be incorrect, since it should only emit an event if mcDiff.osUpdate && len(newConfig.Spec.Extensions)
which then is covered by the mcDiff.osUpdate above so maybe that doesn't make sense
// osChangesString() can return empty in cases where the above diffs are false, | ||
// but the node uses a non standard kernel, so let's make it a bit more | ||
// informative in such cases | ||
reason = fmt.Sprintf("Updating to a target config with %s kernel", canonicalizeKernelType(newConfig.Spec.KernelType)) |
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 was thinking of having this also refer to the rendered config that the update is happening for, but I guess that's relatively easy to match, so no need here.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: djoshy, yuqi-zhang 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 |
/label acknowledge-critical-fixes-only /hold Holding for QE |
Verified using IPI on AWS
/label qe-approved |
@djoshy: This pull request references Jira Issue OCPBUGS-51009, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
/unhold |
/retest-required |
1 similar comment
@djoshy: The following tests failed, say
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. |
- What I did
OSUpdateStarted
events for a specific scenario: there are some extensions currently in use, but no extension installs/uninstalls are taking place. In such cases,rpm-ostree update
is not run and no OS updates are happening. I suspect this a special case that we accounted for that is no longer in use.OSUpdateStarted
event's message a bit more verbose for easier debugging.- How to verify it