Repository navigation
OCPBUGS-86768: Nodes created with 4.13 base images cannot join the cluster #6435
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1227,7 +1227,10 @@ func (dn *Daemon) RunFirstbootCompleteMachineconfig(machineConfigFile string) er | |
| // This currently will incur a double reboot; see https://github.com/coreos/rpm-ostree/issues/4018 | ||
| // If skopeo is < 1.22.2 on a multi-arch image, run as a privileged container which has updated skopeo. | ||
| // See https://redhat.atlassian.net/browse/OCPBUGS-83826 and https://redhat.atlassian.net/browse/OCPBUGS-81187 | ||
| if !newEnough || !skopeoSupportsMultiArchSigstore(mc.Spec.OSImageURL) { | ||
| // If rpm-ostree is < 2023.5, it has a skopeo-proxy sandboxing bug when rebasing | ||
| // from containers-storage or registry sources; run as a privileged container instead. | ||
| // See https://issues.redhat.com/browse/OCPBUGS-86768 (temporary until 4.13/4.14 boot images are unsupported). | ||
| if !newEnough || !skopeoSupportsMultiArchSigstore(mc.Spec.OSImageURL) || !dn.NodeUpdaterClient.SupportsContainerStorageRebase() { | ||
|
Comment on lines
+1230
to
+1233
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win Restore SELinux enforcement on every fallback exit.
Proposed direction-func (dn *Daemon) InplaceUpdateViaNewContainer(target string) error {
+func (dn *Daemon) InplaceUpdateViaNewContainer(target string) (retErr error) {
...
if enforcing {
if err := runCmdSync("setenforce", "0"); err != nil {
return err
}
+ defer func() {
+ if err := runCmdSync("setenforce", "1"); err != nil {
+ if retErr == nil {
+ retErr = err
+ return
+ }
+ klog.Errorf("failed to restore SELinux enforcement: %v", err)
+ }
+ }()
}
...
- if enforcing {
- if err := runCmdSync("setenforce", "1"); err != nil {
- return err
- }
- }
return nil
}📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| logSystem("rpm-ostree or skopeo is not new enough for new-format image; forcing an update via container and queuing immediate reboot") | ||
| if err := dn.InplaceUpdateViaNewContainer(mc.Spec.OSImageURL); err != nil { | ||
| return err | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2867,9 +2867,14 @@ func (dn *Daemon) updateLayeredOS(config *mcfgv1.MachineConfig) error { | |
| } | ||
| // If the host isn't new enough to understand the new container model natively, run as a privileged container. | ||
| // See https://github.com/coreos/rpm-ostree/pull/3961 and https://issues.redhat.com/browse/MCO-356 | ||
| // | ||
| // If skopeo is < 1.22.2 on a multi-arch image, run as a privileged container which has updated skopeo. | ||
| // See https://redhat.atlassian.net/browse/OCPBUGS-83826 and https://redhat.atlassian.net/browse/OCPBUGS-81187 | ||
| if !newEnough || !skopeoSupportsMultiArchSigstore(newURL) { | ||
| // | ||
| // If rpm-ostree is < 2023.5, it has a skopeo-proxy sandboxing bug when rebasing | ||
| // from containers-storage or registry sources; run as a privileged container instead. | ||
| // See https://redhat.atlassian.net/browse/OCPBUGS-86768 (temporary until 4.13/4.14 boot images are unsupported). | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure! |
||
| if !newEnough || !skopeoSupportsMultiArchSigstore(newURL) || !dn.NodeUpdaterClient.SupportsContainerStorageRebase() { | ||
| logSystem("rpm-ostree or skopeo is not new enough for layering; forcing an update via container") | ||
| return dn.InplaceUpdateViaNewContainer(newURL) | ||
| } | ||
|
|
||
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'd say we need a Jira card as a reminder to remove this in our backlog
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.
sure!