Page MenuHomePhabricator

Fail explicitly instead of continuing with a warning if "phd.user" is misconfigured
ClosedPublic

Authored by epriestley on Apr 15 2016, 8:53 PM.
Tags
None
Referenced Files
F19790568: D15726.id37897.diff
Feb 25 2026, 9:38 PM
F19699968: D15726.id37897.diff
Feb 10 2026, 8:18 PM
F19698853: D15726.diff
Feb 10 2026, 7:03 PM
F19574273: D15726.id37900.diff
Feb 1 2026, 6:07 AM
F19561465: D15726.id37901.diff
Jan 31 2026, 10:21 AM
F19554071: D15726.id37900.diff
Jan 29 2026, 5:09 PM
F19554069: D15726.id37900.diff
Jan 29 2026, 5:09 PM
F19061627: D15726.id.diff
Nov 29 2025, 1:02 PM
Subscribers

Details

Summary

Fixes T6806. We haven't seen users having issues with phd.user in a very long time.

Test Plan
  • Configured daemons to run as notepriestley, got a well-explained exception.
  • Configured daemons to run as epriestley, got a clean start.
  • Configured daemons with phd.user=null, got a clean start.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fail explicitly instead of continuing with a warning if "phd.user" is misconfigured.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
areitz added a reviewer: areitz.
areitz added a subscriber: areitz.

LGTM, I think this is the right thing to do.

This revision is now accepted and ready to land.Apr 15 2016, 9:06 PM
epriestley edited edge metadata.
  • Print slightly more information in the exception message.
Usage Exception: Daemons are configured to run as user "notepriestley" in configuration option `phd.user`, but the current user is "epriestley" and `phd` was unable to switch to the correct user with `sudo`. Command output:

Command failed with error #1!
COMMAND
exec sudo -En -u 'notepriestley' -- ./phd-daemon '-l' 'local'

STDOUT
(empty)

STDERR
sudo: unknown user: notepriestley
This revision was automatically updated to reflect the committed changes.