Skip to content
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

Add CLI options to opt-out of socket injection #283

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

elezar
Copy link
Member

@elezar elezar commented Sep 16, 2024

This change allows command line options to the nvidia-container-cli configure and list commands to opt-out of the detection and inclusion of the nvidia-persistenced and nvidia-fabricmanager sockets.

@elezar elezar marked this pull request as draft September 16, 2024 08:53
@elezar elezar requested a review from klueska September 16, 2024 13:34
@elezar elezar self-assigned this Sep 16, 2024
@elezar elezar marked this pull request as ready for review September 16, 2024 13:35
@elezar elezar changed the title Allow socket opt out Add CLI options to opt-out of socket injection Sep 16, 2024
src/cli/configure.c Outdated Show resolved Hide resolved
@elezar elezar force-pushed the allow-socket-opt-out branch 2 times, most recently from d3e7b9e to 763f395 Compare September 17, 2024 12:54
This change adds a no-persistenced option to the configure and list
commands to allow users to opt-out of detecting and injecting the
nvidia-persistenced socket into a container.

Signed-off-by: Evan Lezar <[email protected]>
This change adds a no-fabricmanager option to the configure and list
commands to allow users to opt-out of detecting and injecting the
nvidia-fabricmanager socket into a container.

Signed-off-by: Evan Lezar <[email protected]>
@elezar elezar merged commit 6b8b8e4 into NVIDIA:main Sep 17, 2024
3 checks passed
@elezar elezar deleted the allow-socket-opt-out branch September 17, 2024 19:36
Comment on lines +155 to +162
case 0x86:
if (str_join(&err, &ctx->driver_opts, "no-persistenced", " ") < 0)
goto fatal;
break;
case 0x87:
if (str_join(&err, &ctx->driver_opts, "no-fabricmanager", " ") < 0)
goto fatal;
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

driver_opts needs to be freed since it might get allocated as part of this str_join() call

Comment on lines +75 to +82
case 0x84:
if (str_join(&err, &ctx->driver_opts, "no-persistenced", " ") < 0)
goto fatal;
break;
case 0x85:
if (str_join(&err, &ctx->driver_opts, "no-fabricmanager", " ") < 0)
goto fatal;
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants