Commit 4a5f6a9
Redirect log message to stderr in nvidia runtime wrapper script
This change is required to make our nvidia runtime wrapper compliant with
the OCI runtime spec. All OCI-compliant runtimes must support the operations
documented at https://github.com/opencontainers/runtime-spec/blob/v1.2.1/runtime.md#operations.
Before this change, our nvidia runtime wrapper was not producing the expected
output when the query state operation (`state <container-id>`) was invoked
AND the nvidia kernel modules happened to not be loaded. In this case, we were
emitting an extra log message which caused the stdout of this command to not
adhere to the schema defined in the OCI runtime spec. Redirecting the log
message to stderr makes us compliant.
This issue was discovered when deploying GPU Operator 25.10.0 on nodes using cri-o.
GPU Operator 25.10.0 is the first release that installs nvidia runtime handlers
with cri-o by default, as opposed to installing an OCI hook file. When performing
a GPU driver upgrade, pods in the gpu-operator namespace would be in the
`Init:RunContainerError` state for several minutes until the new driver finished
installing -- note that no nvidia driver modules are loaded during this span of
several minutes. When inspecting the cri-o logs, we observed the following error
message:
```
level=warning msg="Error updating the container status \"16779f4cd2414a164aae56856b491f86fe0c6b803a3b4474ada2cc0864c8e028\": failed to decode container status for 16779f4cd2414a164aae56856b491f86fe0c6b803a3b4474ada2cc0864c8e028: skipThreeBytes: expect ull, error found in #2 byte of ...|nvidia drive|..., bigger context ...|nvidia driver modules are not yet loaded, invoking /|..." id=a4b48041-edc4-48c2-8d75-4ad03cb3d8e1 name=/runtime.v1.RuntimeService/CreateContainer
```
This error message indicates cri-o failed to get the status of the container because
it could not decode the JSON returned by the runtime handler.
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
(cherry picked from commit 61f9bde)1 parent 7d15b8c commit 4a5f6a9
File tree
3 files changed
+5
-5
lines changed- cmd/nvidia-ctk-installer/toolkit/installer
3 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
0 commit comments