Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@klihub
Copy link
Contributor

@klihub klihub commented Sep 16, 2021

Background

This PR is one in a set of 3 related PRs which aim to extend NRI beyond its current v1 capabilities. The primary goal of the proposed extension is to allow NRI to act as a common infrastructure for plugging in extensions to runtimes, and to allow these extensions to implement, among other things, vendor- and domain-specific custom logic for improved container configuration.

This particular PR prototypes integrating cri-o with this extended scope NRI.

Related PRs

The other related PRs in the set are:

For a more detailed description of the full proposal, please refer to this README.

Current State

This implementation is not considered to be ready for merging (hence the RFC title tag). While there are still things to fix, plenty of rough edges to improve, unit tests are missing, etc., we do consider it to be in a good enough shape for a review round. The conceptual idea and the goals behind this proposal should be clear enough, likewise the approach chosen and the related consequences and compromises. If you are interested in any of the related subjects, please chime in. Any and all feedback is welcome.
/kind feature

Add initial support for [Node Resource Interface (NRI)](https://github.com/containerd/nri/) v0.2.0. NRI allows vendors to customize container behavior and configuration using plugins. NRI plugins can register to various events in containers' lifecycle and make controlled changes to containers' configuration when these events occur. This feature is experimental and disabled by default. It can be enabled using the `--enable-nri` command line option or by setting `enable_nri = true` in the CRI-O configuration `[crio.nri]` table. The same table can be used to set other NRI-related configuration options. In addition to enabling NRI support in cri-o, an NRI configuration file also needs to be in place. The default location for this file is `/etc/nri/nri.conf` and it can be empty.

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 16, 2021
@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 16, 2021

Hi @klihub. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 16, 2021
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2021
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Sep 16, 2021
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 21, 2021
@openshift-ci openshift-ci bot added dco-signoff: no Indicates the PR's author has not DCO signed all their commits. and removed dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 21, 2021
@klihub klihub force-pushed the pr/proto/nri branch 3 times, most recently from a4efc8a to 2f478fc Compare October 22, 2021 14:02
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Oct 22, 2021
@codecov
Copy link

codecov bot commented Oct 25, 2021

Codecov Report

Merging #5318 (0c22e63) into main (2ab00cb) will decrease coverage by 1.27%.
The diff coverage is 12.77%.

❗ Current head 0c22e63 differs from pull request most recent head 54b7b5f. Consider uploading reports for the commit 54b7b5f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5318      +/-   ##
==========================================
- Coverage   43.79%   42.52%   -1.28%     
==========================================
  Files         124      125       +1     
  Lines       14354    14898     +544     
==========================================
+ Hits         6286     6335      +49     
- Misses       7388     7875     +487     
- Partials      680      688       +8     

@openshift-ci openshift-ci bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
@klihub klihub force-pushed the pr/proto/nri branch 3 times, most recently from fdb0be6 to ab1662b Compare December 20, 2022 21:03
@haircommander haircommander added this to the 1.26 milestone Dec 20, 2022
Add support for enabling NRI support and for overriding
the default NRI configuration using the command line or
the configuration file.

Signed-off-by: Krisztian Litkey <[email protected]>
Implement an NRI adaptation interface. This takes care
of relaying requests/respones to/from NRI (external NRI
plugins) as well as the logic of applying NRI-requested
container adjustments/updates to actual containers.

This interface is unaware of the internal details of
how we represent pods and containers. The functions to
deal with that, the 'NRI Domain' should be implemented
by server.Server.

Signed-off-by: Krisztian Litkey <[email protected]>
Implement the CRI 'NRI Domain', the functions our NRI
interface needs to deal with CRI pods and containers.
Hook NRI into CRI request processing.

Signed-off-by: Krisztian Litkey <[email protected]>
Add a dedicated test client for testing NRI integration. The client
provides some basic infra to act both as a CRI client and as one or
more NRI plugins. It currently implements a basic set of NRI tests.

Signed-off-by: Krisztian Litkey <[email protected]>
@haircommander
Copy link
Member

/lgtm
/approve

well done @klihub and thanks everyone for reviewing!

(@klihub I've added a section at the bottom to add a release note, can you fill it in please?)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 21, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 21, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, klihub

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Dec 21, 2022
@haircommander
Copy link
Member

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 21, 2022
@haircommander
Copy link
Member

/override ci/prow/ci-rhel-integration

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 21, 2022

@haircommander: Overrode contexts on behalf of haircommander: ci/prow/ci-rhel-integration

Details

In response to this:

/override ci/prow/ci-rhel-integration

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/test-infra repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 21, 2022

@klihub: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/openshift-jenkins/integration_crun_cgroupv2 22f319b link false /test integration_cgroupv2
ci/openshift-jenkins/integration_crun 22f319b link true /test integration_crun
ci/prow/ci-integration ea46b75 link true /test ci-integration
ci/prow/e2e-gcp ea46b75 link true /test e2e-gcp

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@haircommander
Copy link
Member

/test kata-containers
/override ci/prow/ci-e2e-conmonrs
/override ci/prow/ci-rhel-e2e

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2022

@haircommander: Overrode contexts on behalf of haircommander: ci/prow/ci-e2e-conmonrs, ci/prow/ci-rhel-e2e

Details

In response to this:

/test kata-containers
/override ci/prow/ci-e2e-conmonrs
/override ci/prow/ci-rhel-e2e

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/test-infra repository.

@openshift-merge-robot openshift-merge-robot merged commit e46ff15 into cri-o:main Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants