Re: svn commit: r299839 - head/etc/rc.d
On Sun, May 15, 2016 at 9:45 AM, Ian Leporewrote: > On Sun, 2016-05-15 at 04:38 +, 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 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r299839 - head/etc/rc.d
On Sun, 2016-05-15 at 04:38 +, 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.) -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r299839 - head/etc/rc.d
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 MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/etc/rc.d/FILESYSTEMS head/etc/rc.d/dumpon head/etc/rc.d/var head/etc/rc.d/zfs head/etc/rc.d/zvol Modified: head/etc/rc.d/FILESYSTEMS == --- head/etc/rc.d/FILESYSTEMS Sun May 15 04:19:50 2016(r299838) +++ head/etc/rc.d/FILESYSTEMS Sun May 15 04:38:50 2016(r299839) @@ -4,7 +4,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal cleanvar zfs +# REQUIRE: root mountcritlocal cleanvar # This is a dummy dependency, for services which require filesystems # to be mounted before starting. It also serves as the default early / Modified: head/etc/rc.d/dumpon == --- head/etc/rc.d/dumponSun May 15 04:19:50 2016(r299838) +++ head/etc/rc.d/dumponSun May 15 04:38:50 2016(r299839) @@ -4,7 +4,6 @@ # # PROVIDE: dumpon -# REQUIRE: zvol # BEFORE: disks # KEYWORD: nojail Modified: head/etc/rc.d/var == --- head/etc/rc.d/var Sun May 15 04:19:50 2016(r299838) +++ head/etc/rc.d/var Sun May 15 04:38:50 2016(r299839) @@ -28,7 +28,7 @@ # # PROVIDE: var -# REQUIRE: mountcritlocal zfs +# REQUIRE: mountcritlocal # NFS /var is not supported, unless NFS /var is part of diskless NFS / Modified: head/etc/rc.d/zfs == --- head/etc/rc.d/zfs Sun May 15 04:19:50 2016(r299838) +++ head/etc/rc.d/zfs Sun May 15 04:38:50 2016(r299839) @@ -5,6 +5,7 @@ # PROVIDE: zfs # REQUIRE: mountcritlocal +# BEFORE: FILESYSTEMS var . /etc/rc.subr Modified: head/etc/rc.d/zvol == --- head/etc/rc.d/zvol Sun May 15 04:19:50 2016(r299838) +++ head/etc/rc.d/zvol Sun May 15 04:38:50 2016(r299839) @@ -5,6 +5,7 @@ # PROVIDE: zvol # REQUIRE: hostid +# BEFORE: dumpon # KEYWORD: nojail . /etc/rc.subr ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"