Skip to content

Commit a39c195

Browse files
committed
fixup! Add a hook to disable device node creation in a container
Signed-off-by: Evan Lezar <[email protected]>
1 parent 41627c8 commit a39c195

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/nvidia-cdi-hook/disable-device-node-modification/update-nvidia-params.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ func (m command) run(c *cli.Context, cfg *options) error {
9696

9797
s, err := oci.LoadContainerState(cfg.containerSpec)
9898
if err != nil {
99-
return fmt.Errorf("failed to load container state: %v", err)
99+
return fmt.Errorf("failed to load container state: %w", err)
100100
}
101101

102102
containerRoot, err := s.GetContainerRoot()
103103
if err != nil {
104-
return fmt.Errorf("failed to determined container root: %v", err)
104+
return fmt.Errorf("failed to determined container root: %w", err)
105105
}
106106

107107
return m.updateNvidiaParamsFromReader(hostNvidiaParamsFile, containerRoot)
@@ -163,7 +163,7 @@ func createParamsFileInContainer(containerRoot string, contents []byte) error {
163163
}
164164

165165
if err := bindMountReadonly(tempParamsFileName, filepath.Join(containerRoot, nvidiaDriverParamsPath)); err != nil {
166-
return fmt.Errorf("failed to create temporary parms file mount: %w", err)
166+
return fmt.Errorf("failed to create temporary params file mount: %w", err)
167167
}
168168

169169
return nil

0 commit comments

Comments
 (0)