Skip to content

Commit d95589e

Browse files
[no-relnote] ignore deprecation warning of runc/utils/WithProcfd
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
1 parent 055e41f commit d95589e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
3737
return fmt.Errorf("error creating hook scratch folder: %w", err)
3838
}
3939

40+
//nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
4041
err := utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error {
4142
return createTmpFs(hookScratchDirFdPath, len(contents))
4243
})
@@ -49,6 +50,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
4950
return fmt.Errorf("error creating modified params file: %w", err)
5051
}
5152

53+
//nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
5254
err = utils.WithProcfd(containerRootDirPath, modifiedParamsFilePath, func(modifiedParamsFileFdPath string) error {
5355
modifiedParamsFile, err := os.OpenFile(modifiedParamsFileFdPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0444)
5456
if err != nil {
@@ -60,6 +62,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
6062
return fmt.Errorf("failed to write temporary params file: %w", err)
6163
}
6264

65+
//nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
6366
err = utils.WithProcfd(containerRootDirPath, nvidiaDriverParamsPath, func(nvidiaDriverParamsFdPath string) error {
6467
return unix.Mount(modifiedParamsFileFdPath, nvidiaDriverParamsFdPath, "", unix.MS_BIND|unix.MS_RDONLY|unix.MS_NODEV|unix.MS_PRIVATE|unix.MS_NOSYMFOLLOW, "")
6568
})

internal/ldconfig/ldconfig_linux.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ func mountLdConfig(hostLdconfigPath string, containerRoot *os.Root) (string, err
198198
return "", fmt.Errorf("error creating hook scratch folder: %w", err)
199199
}
200200

201+
//nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
201202
err = utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error {
202203
return createTmpFs(hookScratchDirFdPath, int(hostLdconfigInfo.Size()))
203204
})
@@ -209,6 +210,7 @@ func mountLdConfig(hostLdconfigPath string, containerRoot *os.Root) (string, err
209210
return "", fmt.Errorf("error creating ldconfig: %w", err)
210211
}
211212

213+
//nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
212214
err = utils.WithProcfd(containerRootDirPath, ldconfigPath, func(ldconfigFdPath string) error {
213215
return unix.Mount(hostLdconfigPath, ldconfigFdPath, "", unix.MS_BIND|unix.MS_RDONLY|unix.MS_NODEV|unix.MS_PRIVATE|unix.MS_NOSYMFOLLOW, "")
214216
})

0 commit comments

Comments
 (0)