Skip to content

Some log tweaks#7663

Open
twz123 wants to merge 2 commits into
k0sproject:mainfrom
twz123:log-downgrade
Open

Some log tweaks#7663
twz123 wants to merge 2 commits into
k0sproject:mainfrom
twz123:log-downgrade

Conversation

@twz123

@twz123 twz123 commented May 20, 2026

Copy link
Copy Markdown
Member

Description

  • Some processes prefer to re-raise SIGTERM instead of exiting with a zero exit code. In that case, k0s cannot determine whether the process had a clean shutdown or if it even had a proper signal handler to begin with. Downgrade this case from an error to a warning in supervisor and make the log message reflect that the process terminated with SIGTERM instead of exiting cleanly.

  • When the controller lease counter was stopped during component shutdown, an error was logged about losing the controller lease. This is actually the expected behavior. Downgrade that log to info.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Manual test
  • Auto test added

Checklist

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

twz123 added 2 commits May 20, 2026 13:27
Some processes prefer to re-raise SIGTERM instead of exiting with a zero
exit code. In that case, k0s cannot determine whether the process had a
clean shutdown or if it even had a proper signal handler to begin with.

Downgrade this case from an error to a warning and make the log message
reflect that the process terminated with SIGTERM instead of exiting
cleanly.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
When the controller lease counter was stopped, an error was logged about
losing the controller lease. This is actually the expected behavior.
Downgrade that log to info.

Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
@twz123 twz123 added the chore label May 20, 2026
@twz123 twz123 marked this pull request as ready for review May 20, 2026 14:05
@twz123 twz123 requested review from a team as code owners May 20, 2026 14:05
@twz123 twz123 requested review from kke and makhov May 20, 2026 14:05
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that need to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants