Skip to content

Commit 97c135c

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

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

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

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

40-
err := utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error {
40+
err := utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error { //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
4141
return createTmpFs(hookScratchDirFdPath, len(contents))
4242
})
4343
if err != nil {
@@ -49,7 +49,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
4949
return fmt.Errorf("error creating modified params file: %w", err)
5050
}
5151

52-
err = utils.WithProcfd(containerRootDirPath, modifiedParamsFilePath, func(modifiedParamsFileFdPath string) error {
52+
err = utils.WithProcfd(containerRootDirPath, modifiedParamsFilePath, func(modifiedParamsFileFdPath string) error { //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
5353
modifiedParamsFile, err := os.OpenFile(modifiedParamsFileFdPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0444)
5454
if err != nil {
5555
return fmt.Errorf("failed to open modified params file: %w", err)
@@ -60,7 +60,7 @@ func createParamsFileInContainer(containerRoot *os.Root, contents []byte) error
6060
return fmt.Errorf("failed to write temporary params file: %w", err)
6161
}
6262

63-
err = utils.WithProcfd(containerRootDirPath, nvidiaDriverParamsPath, func(nvidiaDriverParamsFdPath string) error {
63+
err = utils.WithProcfd(containerRootDirPath, nvidiaDriverParamsPath, func(nvidiaDriverParamsFdPath string) error { //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
6464
return unix.Mount(modifiedParamsFileFdPath, nvidiaDriverParamsFdPath, "", unix.MS_BIND|unix.MS_RDONLY|unix.MS_NODEV|unix.MS_PRIVATE|unix.MS_NOSYMFOLLOW, "")
6565
})
6666
if err != nil {

internal/ldconfig/ldconfig_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +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-
err = utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error {
201+
err = utils.WithProcfd(containerRootDirPath, hookScratchDirPath, func(hookScratchDirFdPath string) error { //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
202202
return createTmpFs(hookScratchDirFdPath, int(hostLdconfigInfo.Size()))
203203
})
204204
if err != nil {
@@ -209,7 +209,7 @@ func mountLdConfig(hostLdconfigPath string, containerRoot *os.Root) (string, err
209209
return "", fmt.Errorf("error creating ldconfig: %w", err)
210210
}
211211

212-
err = utils.WithProcfd(containerRootDirPath, ldconfigPath, func(ldconfigFdPath string) error {
212+
err = utils.WithProcfd(containerRootDirPath, ldconfigPath, func(ldconfigFdPath string) error { //nolint:staticcheck // TODO (ArangoGutierrez): Remove the nolint:staticcheck and properly fix the deprecation warning.
213213
return unix.Mount(hostLdconfigPath, ldconfigFdPath, "", unix.MS_BIND|unix.MS_RDONLY|unix.MS_NODEV|unix.MS_PRIVATE|unix.MS_NOSYMFOLLOW, "")
214214
})
215215
if err != nil {

0 commit comments

Comments
 (0)