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.29] Don't use the wrong PID in error strings #4596

Merged

Conversation

twz123
Copy link
Member

@twz123 twz123 commented Jun 11, 2024

Instead of using the PID in the argument, the error strings were
constructed using the PID of the currently running process. This would
have caused a panic because the PID file cleanup is called before the
supervised process is started. So the s.cmd would have been nil.

Don't put the PID in the errors at this level at all, but wrap the error
once with the actual PID read from the PID file in maybeKillPidFile.

Signed-off-by: Tom Wieczorek <[email protected]>
(cherry picked from commit eb0839f)
(cherry picked from commit f76bc8d)
@twz123 twz123 added bug Something isn't working backport/release-1.28 PR that needs to be backported/cherrypicked to release-1.28 branch labels Jun 11, 2024
@twz123 twz123 marked this pull request as ready for review June 12, 2024 08:24
@twz123 twz123 requested a review from a team as a code owner June 12, 2024 08:24
@twz123 twz123 requested review from makhov and juanluisvaladas June 12, 2024 08:24
@twz123 twz123 merged commit ca48202 into k0sproject:release-1.29 Jun 12, 2024
77 checks passed
@twz123 twz123 deleted the backport-4540-to-release-1.29 branch June 12, 2024 08:24
@k0s-bot
Copy link

k0s-bot commented Jun 12, 2024

Successfully created backport PR for release-1.28:

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

Successfully merging this pull request may close these issues.

3 participants