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

Prevent podman from logging stderr verbose output as priority 3 journald errors #1223

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

pavinjosdev
Copy link
Contributor

Podman by default logs stderr as priority 3 journald errors. Don't know if other container managers do the same 😖
Github issue: containers/podman#20728

distrobox-create by default enables verbose output for distrobox-init which causes the latter to output all xtrace output as priority 3 journald errors. 🤪

This PR redirects stderr in distrobox-init to stdout to prevent this crazy behavior. 😌

@89luca89 89luca89 added the CI label Feb 20, 2024
@89luca89
Copy link
Owner

Hey @pavinjosdev

I'm unsure about this, will break how enter keeps track of the init status:

image

This also has the side effect of entering the container too early on initful ones, because it doesn't wait for container_setup_done to be printed on stdout, but catches it on stderr!

A fix can be done by changing the switch-case in distrobox-enter, line 584, and remove the leasing * so that it will capture only strings starting with the wanted prefix, instead of matching whole lines, would you like to include this changes in this PR? 😃

Copy link
Owner

@89luca89 89luca89 left a comment

Choose a reason for hiding this comment

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

changes in distrobox-enter needed

@89luca89 89luca89 removed the CI label Feb 20, 2024
Catch only the lines with prefix we want.
@pavinjosdev
Copy link
Contributor Author

@89luca89 Done, good catch to prevent future issues 😅

@89luca89 89luca89 added the CI label Feb 20, 2024
@89luca89
Copy link
Owner

Thanks a lot @pavinjosdev !

@89luca89 89luca89 merged commit 71e0fa6 into 89luca89:main Feb 20, 2024
113 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants