Skip to content

Commit

Permalink
Add no-fabricmanager option
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
elezar committed Sep 17, 2024
1 parent 6585230 commit 13f2046
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cli/configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const struct argp configure_usage = {
{"no-cgroups", 0x84, NULL, 0, "Don't use cgroup enforcement", -1},
{"no-devbind", 0x85, NULL, 0, "Don't bind mount devices", -1},
{"no-persistenced", 0x86, NULL, 0, "Don't include the NVIDIA persistenced socket", -1},
{"no-fabricmanager", 0x87, NULL, 0, "Don't include the NVIDIA fabricmanager socket", -1},
{0},
},
configure_parser,
Expand Down Expand Up @@ -155,6 +156,10 @@ configure_parser(int key, char *arg, struct argp_state *state)
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;
case ARGP_KEY_ARG:
if (state->arg_num > 0)
argp_usage(state);
Expand Down
5 changes: 5 additions & 0 deletions src/cli/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const struct argp list_usage = {
{"mig-monitor", 0x82, "ID", 0, "MIG devices to list monitor capabilities files for", -1},
{"imex-channel", 0x83, "CHANNEL", 0, "IMEX channel ID(s) to inject", -1},
{"no-persistenced", 0x84, NULL, 0, "Don't include the NVIDIA persistenced socket", -1},
{"no-fabricmanager", 0x85, NULL, 0, "Don't include the NVIDIA fabricmanager socket", -1},
{0},
},
list_parser,
Expand Down Expand Up @@ -75,6 +76,10 @@ list_parser(int key, char *arg, struct argp_state *state)
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;
case ARGP_KEY_END:
if (state->argc == 1 || (state->argc == 2 && ctx->imex_channels != NULL)) {
if ((ctx->devices = xstrdup(&err, "all")) == NULL)
Expand Down

0 comments on commit 13f2046

Please sign in to comment.