@@ -521,20 +521,26 @@ func (dn *CoreOSDaemon) applyOSChanges(mcDiff machineConfigDiff, oldConfig, newC
521
521
522
522
// Only check the image type and execute OS changes if:
523
523
// - machineconfig changed
524
- // - we're staying on a realtime kernel ( need to run rpm-ostree update )
525
- // - we have extensions ( need to run rpm-ostree update )
524
+ // - we're staying on a realtime/64k kernel ( need to run rpm-ostree update )
525
+ // - we have a diff in extensions ( need to run rpm-ostree update )
526
526
// We have at least one customer that removes the pull secret from the cluster to "shrinkwrap" it for distribution and we want
527
527
// to make sure we don't break that use case, but realtime kernel update and extensions update always ran
528
528
// if they were in use, so we also need to preserve that behavior.
529
529
// https://issues.redhat.com/browse/OCPBUGS-4049
530
530
if mcDiff .osUpdate || mcDiff .extensions || mcDiff .kernelType || mcDiff .kargs ||
531
531
canonicalizeKernelType (newConfig .Spec .KernelType ) == ctrlcommon .KernelTypeRealtime ||
532
- canonicalizeKernelType (newConfig .Spec .KernelType ) == ctrlcommon .KernelType64kPages ||
533
- len (newConfig .Spec .Extensions ) > 0 {
532
+ canonicalizeKernelType (newConfig .Spec .KernelType ) == ctrlcommon .KernelType64kPages {
534
533
535
534
// Throw started/staged events only if there is any update required for the OS
536
535
if dn .nodeWriter != nil {
537
- dn .nodeWriter .Eventf (corev1 .EventTypeNormal , "OSUpdateStarted" , mcDiff .osChangesString ())
536
+ reason := mcDiff .osChangesString ()
537
+ if reason == "" {
538
+ // osChangesString() can return empty in cases where the above diffs are false,
539
+ // but the node uses a non standard kernel, so let's make it a bit more
540
+ // informative in such cases
541
+ reason = fmt .Sprintf ("Updating to a target config with %s kernel" , canonicalizeKernelType (newConfig .Spec .KernelType ))
542
+ }
543
+ dn .nodeWriter .Eventf (corev1 .EventTypeNormal , "OSUpdateStarted" , reason )
538
544
}
539
545
540
546
if err := dn .applyLayeredOSChanges (mcDiff , oldConfig , newConfig ); err != nil {
0 commit comments