phd - make stop / restart savvy to daemons without pid files
Summary: 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)
Test Plan:
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.
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: epriestley, Korvin
Maniphest Tasks: T2374
Differential Revision: https://secure.phabricator.com/D10354