| Summary: | /etc/rc.d/sysctl : unknown oid 'XXX' [regression] | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Olivier <olivier> | ||||
| Component: | conf | Assignee: | Jilles Tjoelker <jilles> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Olivier
2012-12-20 16:40:00 UTC
Responsible Changed From-To: freebsd-amd64->freebsd-rc reclassify. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 It seems that the old behavior is actually wrong... How are we benefited by not being told about fatal errors? Cheers, - -- Xin LI <delphij@delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJQ2NR3AAoJEG80Jeu8UPuzniUH/0WqlPNwNRhyk1EosRKsVQyU 0x3O9AKRHh1k7qlvCkqSr3tFjMnJ+DVLKL9AfkgPweZj7mQ2q8G3BPZTzYlNWFts aqiZ0o+Ua5F6FVx992yaCPS8Lbwkfmab/ia2HlrowJJmiLdjwu6rOisTnCTPbbvw NbLKzja72nrYFQ5ibub5zFoCP0lwJwSV2m6mhOyG+G07LXY4OZTdPuaBrJ3zCqt2 Pd8AV9jmxsTn5e5jj1w3hJRhShQ1mgSeknYNBvbOFwQE2q4I+UVUr6ulmD624y57 9ID1RHXB8SBbGGyLwaTShSMsSOE1e1wSPNBO2pJzwHSeYw6rMNjo5izrL4GCDhM= =gVdi -----END PGP SIGNATURE----- In the compat.linux.osrelease case it's not a fatal error, it seems that sysctl manages to set the correct value after the linux kld is loaded by linux_enable="YES", even if it failed the first time. % sysctl compat.linux.osrelease compat.linux.osrelease: 2.6.32 I don't really know why and which mechanism is responsible of this but it behaves like "late" mounts. 2012/12/24 Xin Li <delphij@delphij.net>: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > It seems that the old behavior is actually wrong... How are we > benefited by not being told about fatal errors? > > Cheers, > - -- > Xin LI <delphij@delphij.net> https://www.delphij.net/ > FreeBSD - The Power to Serve! Live free or die > -----BEGIN PGP SIGNATURE----- > > iQEcBAEBCAAGBQJQ2NR3AAoJEG80Jeu8UPuzniUH/0WqlPNwNRhyk1EosRKsVQyU > 0x3O9AKRHh1k7qlvCkqSr3tFjMnJ+DVLKL9AfkgPweZj7mQ2q8G3BPZTzYlNWFts > aqiZ0o+Ua5F6FVx992yaCPS8Lbwkfmab/ia2HlrowJJmiLdjwu6rOisTnCTPbbvw > NbLKzja72nrYFQ5ibub5zFoCP0lwJwSV2m6mhOyG+G07LXY4OZTdPuaBrJ3zCqt2 > Pd8AV9jmxsTn5e5jj1w3hJRhShQ1mgSeknYNBvbOFwQE2q4I+UVUr6ulmD624y57 > 9ID1RHXB8SBbGGyLwaTShSMsSOE1e1wSPNBO2pJzwHSeYw6rMNjo5izrL4GCDhM= > =gVdi > -----END PGP SIGNATURE----- -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." Hi,
Isn't the logic inverted between the start/reload case and the lastload case ?
The attached patch seems logical :
- tell sysctl to ignore unknown OIDs during the "start" case (corrects
the regression)
rationale : some klds still aren't loaded at start, my example with
linux_enable="YES" in rc.conf and compat.linux.osrelease=2.6.32 in
sysctl.conf is a common use case, and it's not meaningful / it's
confusing to show a startup error about a sysctl which couldn't be set
while it actually has been set in lastload stage
- tell sysctl to not ignore unknown OIDs during the "lastload" case
(preserve added value of r244198)
rationale : if an OID is really unknown and couldn't be set neither in
the start nor in the lastload cases, it's useful to be told about the
fatal error
- behave in the "reload" case like in the "lastload" stage
rationale : reloads usually happen after system startup so they're
really a "lastlastload", and it's useful to spit out errors about
unknown OIDs to the operator who asked for a reload
Hoping the attachment won't be stripped,
Olivier
--
Olivier Smedts _
ASCII ribbon campaign ( )
e-mail: olivier@gid0.org - against HTML email & vCards X
www: http://www.gid0.org - against proprietary attachments / \
"Il y a seulement 10 sortes de gens dans le monde :
ceux qui comprennent le binaire,
et ceux qui ne le comprennent pas."
Author: jilles Date: Fri Mar 22 20:12:25 2013 New Revision: 248620 URL: http://svnweb.freebsd.org/changeset/base/248620 Log: rc.d/sysctl: Fix error messages about unknown OIDs. There are three situations where the sysctl script is called: 1. "start", very early 2. "lastload", near the end of rc 3. "reload", at admin request while the system is booted Ignore unknown OIDs in situation 1 because kernel modules may not be loaded yet and complain about them in situations 2 and 3. PR: conf/174595 Submitted by: Olivier Smedts Modified: head/etc/rc.d/sysctl Modified: head/etc/rc.d/sysctl ============================================================================== --- head/etc/rc.d/sysctl Fri Mar 22 17:55:38 2013 (r248619) +++ head/etc/rc.d/sysctl Fri Mar 22 20:12:25 2013 (r248620) @@ -11,7 +11,7 @@ name="sysctl" command="/sbin/sysctl" stop_cmd=":" start_cmd="sysctl_start" -reload_cmd="sysctl_start" +reload_cmd="sysctl_start last" lastload_cmd="sysctl_start last" extra_commands="reload lastload" @@ -19,10 +19,10 @@ sysctl_start() { case $1 in last) - command_args="-i -f" + command_args="-f" ;; *) - command_args="-f" + command_args="-i -f" ;; esac _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State Changed From-To: open->closed Fixed in head in r248620, thanks. This bug does not exist in older branches. Responsible Changed From-To: freebsd-rc->jilles Track followups. |