Ref T2374. This currently doesn't work in that while the daemons are stopped, they are restarted. How do I stop them for good? (If it worked I'd also give it a little pass for variable names, etc quality stuff)
Details
Details
- Reviewers
epriestley - Maniphest Tasks
- T2374: Have `bin/phd stop` look for daemons and warn you about them, or nuke them with some flag
- Commits
- Restricted Diffusion Commit
rPd13d6963dde0: phd - make stop / restart savvy to daemons without pid files
14:09:20 ~/Dropbox/code/phalanx (T2374) ~> sudo ./bin/phd restart There are no running Phabricator daemons. Freeing active task leases... Freed 0 task lease(s). Preparing to launch daemons. NOTE: Logs will appear in '/var/tmp/phd/log/daemons.log'. Launching daemon "PhabricatorRepositoryPullLocalDaemon". Launching daemon "PhabricatorGarbageCollectorDaemon". Launching daemon "PhabricatorTaskmasterDaemon". Launching daemon "PhabricatorTaskmasterDaemon". Launching daemon "PhabricatorTaskmasterDaemon". Launching daemon "PhabricatorTaskmasterDaemon". Done. 14:09:30 ~/Dropbox/code/phalanx (T2374) ~> rm -rf /var/tmp/phd/pid/* 14:09:42 ~/Dropbox/code/phalanx (T2374) ~> sudo ./bin/phd stop There are no running Phabricator daemons. There are processes running that look like Phabricator daemons but have no corresponding PID files: php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorRepositoryPullLocalDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorGarbageCollectorDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorTaskmasterDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorTaskmasterDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorTaskmasterDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorTaskmasterDaemon --load-phutil-library=/Users/btrahan/Dropbox/code/arcanist/src --load-phutil-library=/Users/btrahan/Dropbox/code/phalanx/src --log=/var/tmp/phd/log/daemons.log -- php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorRepositoryPullLocalDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorGarbageCollectorDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorTaskmasterDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorTaskmasterDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorTaskmasterDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid php /Users/btrahan/Dropbox/code/phalanx/scripts/daemon/phd-daemon PhabricatorTaskmasterDaemon --daemonize --log=/var/tmp/phd/log/daemons.log --phd=/var/tmp/phd/pid Stop these processes by re-running this command with the --force parameter. 14:09:47 ~/Dropbox/code/phalanx (T2374) ~> sudo ./bin/phd stop --force Interrupting daemon 'Rogue daemon' (66167)... Interrupting daemon 'Rogue daemon' (66174)... Interrupting daemon 'Rogue daemon' (66177)... Interrupting daemon 'Rogue daemon' (66191)... Interrupting daemon 'Rogue daemon' (66193)... Interrupting daemon 'Rogue daemon' (66196)... Interrupting daemon 'Rogue overseer' (66166)... Interrupting daemon 'Rogue overseer' (66169)... Interrupting daemon 'Rogue overseer' (66175)... Interrupting daemon 'Rogue overseer' (66189)... Interrupting daemon 'Rogue overseer' (66192)... Interrupting daemon 'Rogue overseer' (66195)... Daemon 66167 exited. Daemon 66174 exited. Daemon 66177 exited. Daemon 66191 exited. Daemon 66193 exited. Daemon 66196 exited. Daemon 66166 exited. Daemon 66169 exited. Daemon 66175 exited. Daemon 66189 exited. Daemon 66192 exited. Daemon 66195 exited.
Diff Detail
Diff Detail
- Repository
- rP Phabricator
- Branch
- T2374
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 2351 Build 2355: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
Oh -- the overseers need to be killed to stop the daemons for good, but findRunningDaemons() might no longer be able to identify them. It looks for exec_daemon.php (libphutil daemon) and launch_daemon.php (libphutil overseer) but not phd-daemon (phabricator overseer) which we've used since D6534. I'd guess that if you tweak findRunningDaemons() to look for phd-daemon too, that'll fix the issue.