-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[release-1.33] server,factory/container: delay CDI device injection later. #9295
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
base: release-1.33
Are you sure you want to change the base?
[release-1.33] server,factory/container: delay CDI device injection later. #9295
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: klihub 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 |
03baca8
to
d4cde08
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.33 #9295 +/- ##
================================================
- Coverage 47.45% 47.45% -0.01%
================================================
Files 162 162
Lines 24060 24063 +3
================================================
Hits 11418 11418
- Misses 11524 11526 +2
- Partials 1118 1119 +1 🚀 New features to boost your workflow:
|
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>
d4cde08
to
7def266
Compare
@haircommander This is a cherry-pick/backport of #9292 to the 1.33 release branch. If we don't suspect those CI failures to be related to the changes this PR brings in, could we get this in ? |
What type of PR is this?
/kind bug
What this PR does / why we need it:
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.
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Does this PR introduce a user-facing change?