Skip to content

Conversation

openshift-cherrypick-robot

This is an automated cherry-pick of #9296

/assign haircommander

server: delay CDI device injection, to ensure that CDI Spec edits take precedence over image defaults and the Pod Spec.

klihub added 3 commits July 17, 2025 20:55
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Use a few environment variables with default values to verify
that evironment variables from CDI injection take precedence
over ones in the Pod Spec.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Currently CDI device injection is performed right after injecting
other devices into the container. This is problematic because CDI
device injection might alter, among other things, the environment.
However setting up the final environment happens only later during
container creation and it involves setting environment variables
from the image and the Pod Spec. If the same environment variable
is injected both from an image or a container, and from a CDI Spec,
now the former take precedence of the latter. This is unintentional
and wrong.

This patch moves CDI device injection much later during container
creation, between OCI Hook injection and *oci.Container creation.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
@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. labels Jul 17, 2025
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 18, 2025
@sohankunkerkar
Copy link
Member

/retest

@sohankunkerkar sohankunkerkar added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2025
Copy link
Contributor

openshift-ci bot commented Jul 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: openshift-cherrypick-robot, sohankunkerkar

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

The pull request process is described 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

@openshift-merge-bot openshift-merge-bot bot merged commit 3a7cdab into cri-o:release-1.31 Jul 18, 2025
35 of 40 checks passed
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. 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.

4 participants