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

make --syslog errors non fatal #19179

Merged
merged 1 commit into from
Jul 10, 2023
Merged

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Jul 10, 2023

Podman will always pass down --syslog to conmon since 13c2aca. However there systems without syslog running, likely in container setups. As reported in this was already a problem before when debug level is used. Then conmon will pass down --syslog back to the podman container cleanup command causing it to fail without doing anything. Given that I think it is better to just ignore the error and log it on debug level, we need to make sure cleanup works consistently.

[NO NEW TESTS NEEDED]

Fixes #19075

Does this PR introduce a user-facing change?

podman --syslog will no longer return a fatal error when no syslog server is found and ignores the error. 

Podman will always pass down --syslog to conmon since 13c2aca.
However there systems without syslog running, likely in container
setups. As reported in this was already a problem before when debug
level is used. Then conmon will pass down --syslog back to the podman
container cleanup command causing it to fail without doing anything.
Given that I think it is better to just ignore the error and log it on
debug level, we need to make sure cleanup works consistently.

[NO NEW TESTS NEEDED]

Fixes containers#19075

Signed-off-by: Paul Holzinger <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 10, 2023
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

Could we special case Debugf for container cleanup and otherwise use Errorf or even error out? If a user explicitly requests --syslog it may be annoying to figure out it's not working (and be hidden in the debug logs).

@Luap99
Copy link
Member Author

Luap99 commented Jul 10, 2023

Could we special case Debugf for container cleanup and otherwise use Errorf or even error out? If a user explicitly requests --syslog it may be annoying to figure out it's not working (and be hidden in the debug logs).

In theory yes but that would complicate parsing a lot, log hooks are initialized before cli arguments are parsed. I think it is very unlikely to effect any real users.

@rhatdan
Copy link
Member

rhatdan commented Jul 10, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2023
@openshift-merge-robot openshift-merge-robot merged commit 8c071ca into containers:main Jul 10, 2023
@Luap99 Luap99 deleted the syslog branch July 10, 2023 18:58
@Luap99 Luap99 added the 4.6 label Jul 11, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run container in a system without syslog plus debug log level, the exit will time out
4 participants