Skip to content

Add support for Crun hook stdout/stderr annotations in precreate hooks - #2550

Closed
ajoshua2004 wants to merge 1 commit into
containers:mainfrom
ajoshua2004:hook-annotations
Closed

Add support for Crun hook stdout/stderr annotations in precreate hooks#2550
ajoshua2004 wants to merge 1 commit into
containers:mainfrom
ajoshua2004:hook-annotations

Conversation

@ajoshua2004

Copy link
Copy Markdown
Contributor

OCI hooks can redirect their output to a file via 2 crun annotations run.oci.hooks.stdout=FILE/run.oci.hooks.stderr=FILE This works for every hook type except precreatehooks, since those are executed directly by podman before the OCI runtime is invoked so crun doesnt get a chance to honor the annotations. This adds the same annotation support to RuntimeConfigFilterWithOptions so precreate hook output anc be redirected too. PR in podman will be needed to bump vendor dependency.

Test

go test ./pkg/hooks/exec/... -run TestRuntimeConfigFilterOutputRedirection -v

Precreate hooks run directly by podman before the OCI runtime is
invoked, so they never benefit from crun's
run.oci.hooks.stdout/run.oci.hooks.stderr
annotations.

Signed-off-by: Joshua Arrevillaga <2004jarrevillaga@gmail.com>
@github-actions

Copy link
Copy Markdown

This repository has been migrated to https://github.com/containers/container-libs. Please open your PR there.

@github-actions github-actions Bot closed this Aug 17, 2026
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