containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.35k stars 2.38k forks source link

e2e: flake fix: SIGPIPE in hook test #23864

Closed edsantiago closed 4 weeks ago

edsantiago commented 1 month ago

One-off flake, easy to fix. And, as long as I'm fixing it, add a few more checks to it.

Context, for posterity: new flake I had never seen before:

# podman [options] --hooks-dir /blahblah run quay.io/libpod/alpine:latest ls
Error: OCI runtime error: crun: error executing hook `/blahblah/checkhooks.sh` (exit code: -33)
writing to pipe: Broken pipe

Prior to this PR, checkhooks.sh simply ran echo something >somewhere and exited.

Signed-off-by: Ed Santiago santiago@redhat.com

None
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/podman/blob/main/OWNERS)~~ [edsantiago] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
packit-as-a-service[bot] commented 1 month ago

Ephemeral COPR build failed. @containers/packit-build please check.

giuseppe commented 4 weeks ago

@giuseppe for reference #23844 (comment) do you think this sounds right when the hook exits before crun wrote everything to stdin crun fails with broken pipe? Should crun not error here or must hooks always read stdin until EOF?

yes it makes sense to me. It should not fail if the hook succeeded and didn't care about its stdin. I'd still keep the fix in case other runtimes have the same problem

giuseppe commented 4 weeks ago

I've opened an issue for crun: https://github.com/containers/crun/issues/1551

rhatdan commented 4 weeks ago

/lgtm

giuseppe commented 4 weeks ago

I've opened an issue for crun: containers/crun#1551

and a PR: