Skip to content

crun exec: more verbose exec error message#2081

Open
kolyshkin wants to merge 1 commit intocontainers:mainfrom
kolyshkin:exec-verb
Open

crun exec: more verbose exec error message#2081
kolyshkin wants to merge 1 commit intocontainers:mainfrom
kolyshkin:exec-verb

Conversation

@kolyshkin
Copy link
Copy Markdown
Collaborator

Add the actual path we failed to exec into the error.

Add the actual path we failed to exec into the error.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the error handling in exec_process_entrypoint to include the executable path in the error message. The reviewer suggests further improving the error message consistency by explicitly mentioning the container process in the log output.

Comment thread src/libcrun/container.c

TEMP_FAILURE_RETRY (execv (exec_path, process->args));
libcrun_fail_with_error (errno, "exec");
libcrun_fail_with_error (errno, "exec `%s`", exec_path);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with other exec error messages in crun (e.g., in container_init), it would be clearer to make this error message more descriptive.

  libcrun_fail_with_error (errno, "exec container process %s", exec_path);

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.

1 participant