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

CNF-15505: Set crun as the default runtime #1180

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rbaturov
Copy link
Contributor

@rbaturov rbaturov commented Oct 9, 2024

Starting with OCP 4.18, crun is the default container runtime. The operator should align with this and treat crun as the default runtime.
The updated logic will be as follows:

  • If no ContainerRuntimeConfig is applied, crun will be used by default.
  • If a ContainerRuntimeConfig is applied and explicitly requests runc, then switch to runc.

Note:
There is an edge case that raises a concern about this work:
A system upgrade from OCP 4.17 (with performance profile applied and no ContainerRuntimeConfig) to 4.18 will result with the container runtime switch to crun under the hood.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 9, 2024
Copy link
Contributor

openshift-ci bot commented Oct 9, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rbaturov
Copy link
Contributor Author

rbaturov commented Oct 9, 2024

/test all

Copy link
Contributor

openshift-ci bot commented Oct 9, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rbaturov
Once this PR has been reviewed and has the lgtm label, please assign marsik for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@rbaturov
Copy link
Contributor Author

rbaturov commented Oct 9, 2024

/test all

@rbaturov
Copy link
Contributor Author

rbaturov commented Oct 9, 2024

/test all

@rbaturov
Copy link
Contributor Author

rbaturov commented Oct 9, 2024

/test all

@rbaturov
Copy link
Contributor Author

rbaturov commented Oct 9, 2024

/test e2e-gcp-pao e2e-gcp-pao-updating-profile e2e-hypershift-pao e2e-gcp-pao-workloadhints

@rbaturov
Copy link
Contributor Author

/test e2e-gcp-pao

@rbaturov
Copy link
Contributor Author

/test all

@rbaturov
Copy link
Contributor Author

/test all

@rbaturov rbaturov force-pushed the ensure-crun-default branch 2 times, most recently from cba201d to aabe6e0 Compare October 28, 2024 13:53
@rbaturov
Copy link
Contributor Author

/test all

@rbaturov
Copy link
Contributor Author

/test all

@rbaturov
Copy link
Contributor Author

/test all

@rbaturov
Copy link
Contributor Author

/test all

This logic is unnecessary. I've tested this patch and found no need for it.

Signed-off-by: Ronny Baturov <[email protected]>
Starting with OCP 4.18, crun is the default container runtime. The operator should align with this and treat crun as the default runtime.
The updated logic will be as follows:
* If no ContainerRuntimeConfig is applied, crun will be used by default.
* If a ContainerRuntimeConfig is applied and explicitly requests runc, then switch to runc.

Signed-off-by: Ronny Baturov <[email protected]>
* Use crun as the default runtime for rendering
* Commit make render-sync

Signed-off-by: Ronny Baturov <[email protected]>
@rbaturov
Copy link
Contributor Author

rbaturov commented Nov 5, 2024

/test all

Copy link
Contributor

openshift-ci bot commented Nov 5, 2024

@rbaturov: 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-sigs/prow repository. I understand the commands that are listed here.

@rbaturov rbaturov changed the title Ensure crun default Set crun as the default runtime Nov 6, 2024
@rbaturov rbaturov changed the title Set crun as the default runtime CNF-15505: Set crun as the default runtime Nov 6, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 6, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 6, 2024

@rbaturov: This pull request references CNF-15505 which is a valid jira issue.

In response to this:

Starting with OCP 4.18, crun is the default container runtime. The operator should align with this and treat crun as the default runtime.
The updated logic will be as follows:

  • If no ContainerRuntimeConfig is applied, crun will be used by default.
  • If a ContainerRuntimeConfig is applied and explicitly requests runc, then switch to runc.

Note:
There is an edge case that raises a concern about this work:
A system upgrade from OCP 4.17 (with performance profile applied and no ContainerRuntimeConfig) to 4.18 will result with the container runtime switch to crun under the hood.

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.

Previously, to select the container runtime for high-performance class, we checked for an existing ContainerRuntimeConfig. If none was found, the default runtime was used. However, starting with OCP 4.18, the default runtime switches to crun, meaning that systems upgrading from OCP 4.17 to 4.18 would experience an unintended runtime switch under the hood.
To prevent this, the MCO team introduced a patch in OCP 4.17 to create a default machine config for all MCP's, explicitly setting runc as the runtime. As a result, we need to adjust our logic to identify this MachineConfig when no ContainerRuntimeConfig is found.

Signed-off-by: Ronny Baturov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants