Bug 252733 - devel/phabricator phd daemon wrong REQUIRE
Summary: devel/phabricator phd daemon wrong REQUIRE
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Michael Gmelin
Depends on:
Reported: 2021-01-16 04:48 UTC by Evgeny Moysevich
Modified: 2021-01-16 08:28 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (grembo)


Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Moysevich 2021-01-16 04:48:21 UTC
REQUIRE for phd deaemon is set to LOGIN currently.
I believe it should be set to mysql instead, because phd depends on MySQL and shouldn't be started until MySQL is running.
Comment 1 Michael Gmelin freebsd_committer 2021-01-16 08:28:24 UTC
In general you are correct, *if* the database is running on the same host/within the same jail.

It's quite common for a database to run on a separate host though (be it in a separate jail, a separate server, or sourced from a service/cloud provider). In these cases you probably wouldn't install a mysql or mariadb server within the same instance, which causes rcorder to issue a warning:

  rcorder: requirement `mysql' in file `/usr/local/etc/rc.d/phd' has no providers.

This won't prevent the service from starting though, as rcorder(8) says:

       The "REQUIRE" keyword is misleading: It does not describe which daemons
       have to be running before a script will be started.  It describes which
       scripts must be placed before it in the dependency ordering.  For
       example, if your script has a "REQUIRE" on "named", it means the script
       must be placed after the "named" script in the dependency ordering, not
       necessarily that it requires named(8) to be started or enabled.

I'm happy to change the rc script to "require" mysql, but it would still be nice if there was a way to make this work in a clean/configurable way.