Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce logs noise when attach input on ExecStartAndAttach #25345

Merged

Conversation

lpcalisi
Copy link
Contributor

@lpcalisi lpcalisi commented Feb 17, 2025

closes #25344

Does this PR introduce a user-facing change?

Silenced an error from the go bindings that may caused pkg/bindings/containers.ExecStartAndAttach() to report erroneous errors when stdin was consumed after the exec session was stopped.

cc @mesaglio

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Thanks, just some small comments. Also please add Fixes #25344 to your commit message body.

I looked at the tests and I don't think it is worth it to mess with the logrus options just to check for a single line so I add "Now New Tests"

@Luap99 Luap99 added the No New Tests Allow PR to proceed without adding regression tests label Feb 17, 2025
@lpcalisi lpcalisi force-pushed the fix/reduce-noise-logs-when-stdin branch from f49768a to bd2675c Compare February 17, 2025 17:50
Fixes containers#25344

Signed-off-by: Lucas Pablo Calisi <calisi.lucas@gmail.com>
@lpcalisi lpcalisi force-pushed the fix/reduce-noise-logs-when-stdin branch from bd2675c to bbb9424 Compare February 17, 2025 17:52
@lpcalisi lpcalisi requested a review from Luap99 February 17, 2025 17:53
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note and removed release-note-none labels Feb 17, 2025
@lpcalisi
Copy link
Contributor Author

lpcalisi commented Feb 17, 2025

@Luap99 CI fails on int podman debian-13 root host sqlite , but i'm not sure if was for the change, maybe any CI issue?

@baude
Copy link
Member

baude commented Feb 17, 2025

@Luap99 CI fails on int podman debian-13 root host sqlite , but i'm not sure if was for the change, maybe any CI issue?

Ill watch your PR. It looks like flakes ... and I have restarted it. I'll also review now too. Thanks so much for your contribution to Podman.

if err != nil && err != define.ErrDetach {
// Ignore "closed network connection" as it occurs when the container ends, which is expected.
// This avoids noisy logs but does not fix the goroutine leak
// https://github.com/containers/podman/issues/25344
Copy link
Member

Choose a reason for hiding this comment

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

im confused. the comment says it does not fix the issue, but the commit says it closes it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baude Thanks for your review!
The issue mainly addresses the noisy logs, but as @Luap99 mentioned, we have no way to close the goroutine. This change fixes the noisy logs but does not address the root cause of the goroutine leak.

If you think we should update the comment or the issue title, please let me know.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baude @Luap99 i've updated the issue title focus on noise in the logs, does it look right now?

@baude
Copy link
Member

baude commented Feb 17, 2025

just looking for some clarification ... LGTM otherwise.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2025
Copy link
Contributor

openshift-ci bot commented Feb 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lpcalisi, Luap99

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 62fd27b into containers:main Feb 18, 2025
83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. No New Tests Allow PR to proceed without adding regression tests release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ExecStartAndAttach - noise in logs by incorrect goroutine handling after exec completion
3 participants