Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1418

Allow httpd to restart after the sever reboot from poweroff

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Boxiang Sun requested to merge Daetalus/slapos:httpd-reboot into master Aug 09, 2023
  • Overview 31
  • Commits 1
  • Pipelines 0
  • Changes 5

If a server reboots brutally, there will be a legacy httpd pid file stay in the file system, and the OS may reuse the PID that remains in that file, which will cause httpd service to fail to start even if there is no such httpd service is running.

This commit implemented the following logic:

  1. If there is no existing PID file, then run the httpd service directly
  2. If the PID file exists and contains the PID used by another process, we delete the PID file, then restart the httpd service
  3. If the PID file exists and contains the PID used by another running httpd service, we allow the httpd report the "already running" error normally
Edited Sep 08, 2023 by Romain Courteaud
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: httpd-reboot
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7