Skip to content

Commit 7c07907

Browse files
MCD RHEL9-specific logic updated for RHEL10 compatibility
1 parent a9832bd commit 7c07907

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pkg/daemon/daemon.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,15 @@ func ReexecuteForTargetRoot(target string) error {
535535
if sourceOsVersion.IsLikeRHEL() && targetOsVersion.IsLikeRHEL() {
536536
sourceMajor := sourceOsVersion.BaseVersionMajor()
537537
targetMajor := targetOsVersion.BaseVersionMajor()
538-
if sourceMajor == "9" && targetMajor == "8" {
538+
539+
// When container is newer than target, use target-compatible binary
540+
if sourceMajor == "10" && targetMajor == "9" {
541+
sourceBinarySuffix = ".rhel9"
542+
klog.Info("container is rhel10, target is rhel9")
543+
} else if sourceMajor == "10" && targetMajor == "8" {
544+
sourceBinarySuffix = ".rhel8"
545+
klog.Info("container is rhel10, target is rhel8")
546+
} else if sourceMajor == "9" && targetMajor == "8" {
539547
sourceBinarySuffix = ".rhel8"
540548
klog.Info("container is rhel9, target is rhel8")
541549
} else {

pkg/daemon/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,7 @@ func (dn *Daemon) updateKubeConfigPermission() error {
22882288
// (/home/core/.ssh/authorized_keys.d/ignition) or the old SSH key path
22892289
// (/home/core/.ssh/authorized_keys)
22902290
func (dn *Daemon) useNewSSHKeyPath() bool {
2291-
return dn.os.IsEL9() || dn.os.IsFCOS() || dn.os.IsSCOS()
2291+
return dn.os.IsEL9() || dn.os.IsEL10() || dn.os.IsFCOS() || dn.os.IsSCOS()
22922292
}
22932293

22942294
// Update a given PasswdUser's SSHKey

0 commit comments

Comments
 (0)