Skip to content

Fix stale pid handling in nebula.service#6149

Open
officialasishkumar wants to merge 1 commit into
vesoft-inc:masterfrom
officialasishkumar:fix/service-stale-pid
Open

Fix stale pid handling in nebula.service#6149
officialasishkumar wants to merge 1 commit into
vesoft-inc:masterfrom
officialasishkumar:fix/service-stale-pid

Conversation

@officialasishkumar
Copy link
Copy Markdown

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number: #5998

Description:

scripts/nebula.service start refuses to start when a stale pid file points to a live process, even if that pid has been reused by an unrelated executable. Users have to remove the stale pid file manually.

How do you solve it?

When a pid file exists, verify whether the live pid belongs to the expected Nebula executable. If it is the expected executable, keep the existing "already running" behavior. If it is positively identified as another executable, remove the stale pid file and continue startup. If the process cannot be identified, keep the conservative failure behavior.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Validated with bash -n scripts/nebula.service scripts/utils.sh, git diff --check, and a temporary service-layout repro where the pid file pointed to a live unrelated sleep process.

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

Fixed nebula.service start failing on stale pid files that point to unrelated live processes.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants