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

[Backport release-1.25] Use custom log writer for stdout/err in supervisor #2694

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

k0s-bot
Copy link

@k0s-bot k0s-bot commented Feb 7, 2023

Automated backport to release-1.25, triggered by a label in #2688.
See #2674.

The io.Writer implementation provided by logrus refuses to write
lines that are longer than 64k. An error is logged and the log pipe is
closed. This will cause the stdout or stderr of the supervised process
to be broken ("broken pipe"). Depending on the supervised process, the
result may vary. At a minimum, k0s will no longer log anything from the
affected processes. Some processes (e.g. the kubelet) will terminate
themselves when trying to use stdout/stderr, resulting in a restart.

Use a custom io.Writer instead. It will do pretty much the same thing as
logrus's one, but it will chunk long lines into multiple log statements.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
(cherry picked from commit 46f816f)
(cherry picked from commit 269b790)
@k0s-bot k0s-bot requested a review from a team as a code owner February 7, 2023 07:18
@k0s-bot k0s-bot requested review from ncopa and twz123 February 7, 2023 07:18
@twz123 twz123 changed the title [Backport release-1.25] [Backport release-1.26] Use custom log writer for stdout/err in supervisor [Backport release-1.25] Use custom log writer for stdout/err in supervisor Feb 7, 2023
@twz123 twz123 added bug Something isn't working security fix backport/release-1.24 PR that needs to be backported/cherrypicked to release-1.24 branch labels Feb 7, 2023
@twz123 twz123 merged commit ad5252e into release-1.25 Feb 7, 2023
@twz123 twz123 deleted the backport-2688-to-release-1.25 branch February 7, 2023 11:49
@k0s-bot
Copy link
Author

k0s-bot commented Feb 7, 2023

Backport failed for release-1.24, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin release-1.24
git worktree add -d .worktree/backport-2694-to-release-1.24 origin/release-1.24
cd .worktree/backport-2694-to-release-1.24
git checkout -b backport-2694-to-release-1.24
ancref=$(git merge-base 400eb75704a14e4094c8fa344623c05e90cfdd0a 5eca556d4673df3a2ebe81128980956e433f2470)
git cherry-pick -x $ancref..5eca556d4673df3a2ebe81128980956e433f2470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/release-1.24 PR that needs to be backported/cherrypicked to release-1.24 branch bug Something isn't working security fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants