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

Skip to content

Conversation

@klihub
Copy link
Contributor

@klihub klihub commented May 22, 2023

What type of PR is this?

/kind other

What this PR does / why we need it:

Take the recently introduced CRI ContainerConfig.CDIDevices field into use as the primary source for CDI device resolution and injection..

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Note that this commit does not remove CDI device injection using annotations. That will get deprecated and eventually removed in tandem with CDI itself.

Does this PR introduce a user-facing change?

- add support for CDI device resolution and injection using the dedicated CRI ContainerConfig.CDIDevices field.

@klihub klihub requested a review from mrunalp as a code owner May 22, 2023 08:44
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/other Categorizes issue or PR as not clearly related to any existing kind/* category labels May 22, 2023
@openshift-ci openshift-ci bot requested review from QiWang19 and sohankunkerkar May 22, 2023 08:44
@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #6944 (a3d229a) into main (791027b) will increase coverage by 0.03%.
Report is 91 commits behind head on main.
The diff coverage is 82.60%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6944      +/-   ##
==========================================
+ Coverage   49.16%   49.20%   +0.03%     
==========================================
  Files         135      135              
  Lines       15484    15504      +20     
==========================================
+ Hits         7612     7628      +16     
- Misses       6970     6973       +3     
- Partials      902      903       +1     

@klihub klihub force-pushed the devel/use-dedicated-cdi-field branch 3 times, most recently from e24ea17 to 1adb0b1 Compare May 22, 2023 11:56
@klihub
Copy link
Contributor Author

klihub commented May 22, 2023

/retest-required

Copy link
Contributor

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any man page changes needed?

@klihub
Copy link
Contributor Author

klihub commented May 23, 2023

Any man page changes needed?

There shouldn't be any. This change is about how a Kubernetes DRA driver requests CDI device injection into containers. It should be a non-user-visible change.

Originally we lacked a dedicated CRI protocol field for this, so a CDI-specific annotation was used. Now, with a dedicated CRI protocol field in place, it became the primary/preferred way of communication. The original original annotation is still supported for backward compatibility. It will soon get marked as deprecated, at which point we'll start giving a warning about its usage. Eventually it will be removed altogether and we'll turn the warning into an error.

@haircommander
Copy link
Member

/approve

LGTM, test failures don't seem related

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2023
log.Infof(context.TODO(),
"Skipping duplicate annotated CDI device %s", name)
continue
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above is a valid warning. Can you add a test case covering this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klihub would you like to handle this as a follow-up?

Copy link
Member

@sohankunkerkar sohankunkerkar Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's handle this in the follow-up PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, if it is OK for folks to just get this in and then handle that and anything else that might come up with with a follow-up PR, then I'd be for that, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But let me rebase on latest main and check at the same time if I could add such a test with minimal effort.

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

A friendly reminder that this PR had no activity for 30 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 8, 2023
@sohankunkerkar sohankunkerkar removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 12, 2023
Copy link
Member

@sohankunkerkar sohankunkerkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@haircommander haircommander added this to the 1.28 milestone Jul 12, 2023
@klihub klihub force-pushed the devel/use-dedicated-cdi-field branch from 1adb0b1 to eb7f5a5 Compare July 13, 2023 15:02
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 13, 2023
@klihub klihub force-pushed the devel/use-dedicated-cdi-field branch 3 times, most recently from 3499c97 to 0872e24 Compare July 14, 2023 04:07
Use the recently introduced CRI Config.CDIDevices field as
the primary source of CDI device references to resolve and
inject.

Note that this commit does not remove CDI device injection
using annotations. That will get deprecated and eventually
removed in tandem with CDI itself.

Signed-off-by: Krisztian Litkey <[email protected]>
@klihub klihub force-pushed the devel/use-dedicated-cdi-field branch from 0872e24 to a3d229a Compare July 14, 2023 04:14
@sohankunkerkar
Copy link
Member

/retest

// of injecting CDI devices to give people time to update their DRA drivers.
// TODO(klihub): Change the log message to a warning once annotations are
// deprecated, and to an error once support is removed altogether.
_, annotated, err = cdi.ParseAnnotations(c.Config().GetAnnotations())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mark them as deprecated for 1.28 and then remove them in 1.29?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should mark it deprecated. About removing support for it altogether, I think we should go in sync with what @bart0sh is doing on that front in containerd.

@haircommander
Copy link
Member

/retest
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2023
@haircommander
Copy link
Member

/retest

3 similar comments
@sohankunkerkar
Copy link
Member

/retest

@sohankunkerkar
Copy link
Member

/retest

@sohankunkerkar
Copy link
Member

/retest

@haircommander
Copy link
Member

/override ci/prow/e2e-aws-ovn

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 21, 2023

@haircommander: Overrode contexts on behalf of haircommander: ci/prow/e2e-aws-ovn

Details

In response to this:

/override ci/prow/e2e-aws-ovn

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 3e6b636 into cri-o:main Aug 21, 2023
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. kind/other Categorizes issue or PR as not clearly related to any existing kind/* category lgtm Indicates that a PR is ready to be merged. 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.

6 participants