svn commit: r299839 - head/etc/rc.d

Ngie Cooper yaneurabeya at gmail.com
Mon May 16 19:59:11 UTC 2016


On Sun, May 15, 2016 at 9:45 AM, Ian Lepore <ian at freebsd.org> wrote:
> On Sun, 2016-05-15 at 04:38 +0000, Garrett Cooper wrote:
>> Author: ngie
>> Date: Sun May 15 04:38:50 2016
>> New Revision: 299839
>> URL: https://svnweb.freebsd.org/changeset/base/299839
>>
>> Log:
>>   Make FILESYSTEMS, dumpon, and var not depend on zfs and zvol
>>
>>   Make zfs and zvol come before all of the items that depended on
>> them
>>   previously
>
> I'm trying to figure out why these changes are needed.  rcorder works
> just fine when a requirement has no providers (yes, it whines, but
> that's why /etc/rc invokes it with 2>/dev/null).  If FILESYSTEMS
> requires zfs and nothing provides zfs, then it's as if the requirement
> weren't in the list at all.
>
> The manpage for rcorder is wrong, the DIAGNOSTICS section implies that
> rcorder will abort on a missing requirement, but it doesn't.
>
> Changing requirements to BEFOREs seems like it has a lot of potential
> for messing with peoples' out-of-tree customizations.  (And for some
> reason I've always had the impression that BEFORE was to be avoided in
> the base rc files, but I can't remember why I think that.)

Hi Ian,
    Answering both you and Ravi, I agree that the general boot case
will "just work" (tm), but it masks issues. In the vanilla case,
/etc/rc redirects stderr to /dev/null . This unfortunately hides both
missing rc.d dependencies called out as REQUIREs, as well as circular
dependencies (which you might notice if you ran rcorder on the
directory after r287197 on head -- see:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202726 ), which
means that if anyone is running rcorder without directing the stderr
to /dev/null, they'll be confused by circular dependencies or missing
PROVIDEs if rc.d script aren't installed; I do this sometimes by
cd'ing to the etc/rc.d directory and running rcorder `make -VFILES`.
Anytime there's a circular dependency, rcorder tosses the whole thing
out and screws up the boot order.
    In the $work case, we use a different system internally at $work
for running parallel boot that calculates rc.d script dependencies in
a lot more pedantic way. If a dependency is missing, our boot will
fail, so we've created a bunch of dummy provides for missing rc.d
scripts that are REQUIREments that we don't install. This bloats the
rc.d graph more than necessary.
    All in all, this entire thing is a mess; I'm just shuffling deck
chairs right now so I can replace boards and refinish parts of the
metaphorical deck enough that things will work "ok" for 11.0-RELEASE.
I'll talk with mmacy about launchd and come up with an official
proposal for how to move forward with boot in 12.0, because rc is a
dated system and needs to be replaced with something more performant
and more flexible/logical (run things based on events instead of a
one-time static boot order).
Thanks,
-Ngie


More information about the svn-src-all mailing list