From 0cbbba8ccf635fec3985aa5b3d7f0e7ff6f36b31 Mon Sep 17 00:00:00 2001 From: Dorin Geman Date: Mon, 27 Oct 2025 11:54:40 +0200 Subject: [PATCH] fix(standalone): make render group addition non-fatal Signed-off-by: Dorin Geman --- cmd/cli/pkg/standalone/containers.go | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/cmd/cli/pkg/standalone/containers.go b/cmd/cli/pkg/standalone/containers.go index 4920ba902..beae20ee8 100644 --- a/cmd/cli/pkg/standalone/containers.go +++ b/cmd/cli/pkg/standalone/containers.go @@ -334,14 +334,21 @@ func CreateControllerContainer(ctx context.Context, dockerClient *client.Client, if runtime.GOOS == "linux" { out, err := exec.CommandContext(ctx, "getent", "group", "render").CombinedOutput() if err != nil { - return fmt.Errorf("failed to retrieve the GID of 'render': %w", err) - } - tokens := strings.Split(string(out), ":") - gid, err := strconv.Atoi(tokens[2]) - if err != nil { - return fmt.Errorf("failed to parse the GID of 'render': %w", err) + printer.Printf("Warning: render group not found, skipping group addition\n") + } else { + trimmedOut := strings.TrimSpace(string(out)) + tokens := strings.Split(trimmedOut, ":") + if len(tokens) < 3 { + printer.Printf("Warning: unexpected getent output format: %q\n", trimmedOut) + } else { + gid, err := strconv.Atoi(tokens[2]) + if err != nil { + printer.Printf("Warning: failed to parse render GID from %q: %v\n", tokens[2], err) + } else { + hostConfig.GroupAdd = append(hostConfig.GroupAdd, strconv.Itoa(gid)) + } + } } - hostConfig.GroupAdd = append(hostConfig.GroupAdd, strconv.Itoa(gid)) } // Create the container. If we detect that a concurrent installation is in