Ref T4209. Currently, ./bin/phd status prints a table showing the daemons that are executing on the current host. It would be useful to be able to conventiently query the daemons running across all hosts. This would also (theoretically) make it possible to conditionally start daemons on a host depending upon the current state and on the daemons running on other hosts.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T4209: Multiserver / High-Availability Configuration
- Commits
- Restricted Diffusion Commit
rP0ccebbe4b1dd: Query daemons across all hosts with `./bin/phd status --all`.
> ./bin/phd status --all ID Host PID Started Daemon Arguments 18 phabricator 6969 Jun 12 2014, 4:44:22 PM PhabricatorTaskmasterDaemon 17 phabricator 6961 Jun 12 2014, 4:44:19 PM PhabricatorTaskmasterDaemon 16 phabricator 6955 Jun 12 2014, 4:44:15 PM PhabricatorTaskmasterDaemon 15 phabricator 6950 Jun 12 2014, 4:44:14 PM PhabricatorTaskmasterDaemon 14 phabricator 6936 Jun 12 2014, 4:44:13 PM PhabricatorGarbageCollectorDaemon 13 phabricator 6931 Jun 12 2014, 4:44:12 PM PhabricatorRepositoryPullLocalDaemon
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
This needs a bit of touching up, but let me know what you think.
src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php | ||
---|---|---|
10–11 | Maybe this doesn't need a separate flag to control this... Possibly we could just show one unified view which combines information from the database with information from the PID files. | |
14–18 | See above. | |
75 | This is getting out of control... Additionally, it's hard to predict how long some of the fields would be (particularly "Host" and "Arguments"). | |
90 | $daemon-getArgv() is a little too verbose here. Possibly we could filter out all of the normal argv stuff and just display anything custom? Whether or not this is easier to filter is another question. |
I was doing some additional work on this and thinking of unifying the local and global view into one... @epriestley, wdyt?
I'm fine with pretty much whatever. I think this is a solid improvement on the status quo, and integrating the views would be a further improvement. You could land this for now and do that later.
src/applications/daemon/management/PhabricatorDaemonManagementWorkflow.php | ||
---|---|---|
49 | Unused. | |
50 | Not an array / file is not read. Probably intended to be newFromFile()? | |
51 | $ref not defined. | |
51 | Unused. | |
58 | This never returns. | |
src/infrastructure/daemon/control/PhabricatorDaemonReference.php | ||
34–38 | Static function, should be $ref. |