Page MenuHomePhabricator

Pass most daemon configuration over stdin
ClosedPublic

Authored by epriestley on Feb 22 2015, 3:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 8:35 PM
Unknown Object (File)
Thu, Apr 11, 7:31 AM
Unknown Object (File)
Fri, Apr 5, 2:33 AM
Unknown Object (File)
Feb 23 2024, 11:40 PM
Unknown Object (File)
Feb 19 2024, 3:53 AM
Unknown Object (File)
Feb 12 2024, 9:43 AM
Unknown Object (File)
Feb 11 2024, 1:47 PM
Unknown Object (File)
Jan 27 2024, 4:37 AM
Subscribers

Details

Summary

Ref T7352. Currently, we pass daemon configuration entirely over command-line arguments. This produces command lines like these in the cluster:

php ./exec_daemon.php PhabricatorTaskmasterDaemon
  --load-phutil-library=/core/lib/arcanist/src
  --load-phutil-library=/core/lib/phabricator/src
  --load-phutil-library=/core/lib/core/src
  --load-phutil-library=/core/lib/services/src
  --log=/core//log/mail/phd/daemons.log --

This doesn't cause any problems, per se, but it's messy, makes "ps auxwww" hard to read, and makes it difficult to identify which processes are doing what. There's also some actual limit on command length, although I believe it is so huge on all modern systems that we'll never realistically hit it.

However, I plan to make daemon configuration more complex (introduce autoscaling arguments) and make overseer configuration much more complex (pass it a list of daemons). The overseer change essentially requires that it change to take arguments like this to remain reasonable. For consistency, and because it is nice to clean up "ps", pass them over stdin here too.

I also added a "-l nicelabel" flag which we can use to tag these processes with the instance they're running under to make "ps" more useful.

Test Plan

Ran phd start, phd debug nice, etc. Observed standard behavior.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Pass most daemon configuration over stdin.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 23 2015, 5:26 PM
This revision was automatically updated to reflect the committed changes.