Phabricator's phd can't sudo to user phd
Closed, ResolvedPublic

Description

Running

sudo service phd restart

results in

Freeing active task leases...
Freed 0 task lease(s).
Preparing to launch daemons.
NOTE: Logs will appear in '/var/log/phd/daemons.log'.

Starting daemons as phd
Launching daemon "PhabricatorRepositoryPullLocalDaemon".
sudo command failed. Starting daemon as current user
Starting daemons as phd
Launching daemon "PhabricatorGarbageCollectorDaemon".
sudo command failed. Starting daemon as current user
Starting daemons as phd
Launching daemon "PhabricatorTaskmasterDaemon".
sudo command failed. Starting daemon as current user
Starting daemons as phd
Launching daemon "PhabricatorTaskmasterDaemon".
sudo command failed. Starting daemon as current user
Starting daemons as phd
Launching daemon "PhabricatorTaskmasterDaemon".
sudo command failed. Starting daemon as current user
Starting daemons as phd
Launching daemon "PhabricatorTaskmasterDaemon".
sudo command failed. Starting daemon as current user
Done.

further debugging can be done by running

/srv/phab/phabricator/bin/phd debug PhabricatorTaskmasterDaemon

and that results in

Usage Exception: You are trying to run a daemon as a nonstandard user, and `phd` was not able to `sudo` to the correct user. 
Phabricator is configured to run daemons as "phd", but the current user is "root". 
Use `sudo` to run as a different user, pass `--as-current-user` to ignore this warning, or edit `phd.user` to change the configuration.

This is running on labs with role::labs::instance and role::phabricator::labs enabled.
See T77976

Negative24 updated the task description. (Show Details)
Negative24 raised the priority of this task from to Needs Triage.
Negative24 added a project: Phabricator.
Negative24 added a subscriber: Negative24.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 21 2015, 5:31 PM
Krenair set Security to None.
chasemp closed this task as Resolved.Mar 23 2015, 4:15 PM
chasemp claimed this task.
chasemp added a subscriber: chasemp.

Thanks. (Is @gerritbot working?)

See https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines#Cross-references

It's not enough to just mention the phab task; you need to follow the standard format.

The commit's metadata (including change-id) starts after the message's last blank line. The reference must be in that metadata section and it must be in the format Bug: T\d+.

Ah. Okay then.