Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439564 - net-misc/ntp ntp-client init script should change "need net" to "after net"
Summary: net-misc/ntp ntp-client init script should change "need net" to "after net"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 449696 463974 510406 532434 (view as bug list)
Depends on:
Blocks: need-net
  Show dependency tree
 
Reported: 2012-10-24 21:00 UTC by Matthew Schultz
Modified: 2015-04-08 20:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2012-10-24 21:00:29 UTC
This service fails to start on a my machine with a nfs network root mounted filesystem:

 * ERROR: syslog-ng needs service(s) net
 * Starting acpid ...
 [ ok ]
 * Running cpufreq-set --governor ondemand ...
 [ ok ]
 * Starting D-BUS system messagebus ...
 [ ok ]
 * ERROR: ntp-client needs service(s) net
 * Starting ntpd ...
 [ ok ]
 * ERROR: snmpd needs service(s) net
 * ERROR: sshd needs service(s) net
 * Doing udev cleanups
 * Starting local
 [ ok ]

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2012-10-27 19:16:37 UTC
except ntp-client runs exactly once and does so by connecting over the network to a remote system
Comment 2 William Hubbs gentoo-dev 2012-10-27 21:42:33 UTC
I still recommend dropping "need net" and having the user use rc_need in
the conf.d file to set the interface that the service needs.

See Diego's blog entry on the subject [1].

[1]
http://blog.flameeyes.eu/2012/10/may-i-have-a-network-connection-please
Comment 3 SpanKY gentoo-dev 2012-10-28 02:58:44 UTC
for services that listen passively, culling "need net" makes sense.  for services that actively make connections, "need net" is a perfectly fine default.  requiring the majority of people to add explicit "rc_need" settings to every network connecting service to satisfy the tiny number of people who have an unusual setup is wrong.  the point of defaults is to be sane out of the box.

ntp-client has been this way for almost a decade and hasn't been an issue.
Comment 4 Matthew Schultz 2012-10-28 04:43:18 UTC
(In reply to comment #3)
> for services that listen passively, culling "need net" makes sense.  for
> services that actively make connections, "need net" is a perfectly fine
> default.  requiring the majority of people to add explicit "rc_need"
> settings to every network connecting service to satisfy the tiny number of
> people who have an unusual setup is wrong.  the point of defaults is to be
> sane out of the box.
> 
> ntp-client has been this way for almost a decade and hasn't been an issue.

I agree with William.  What would be the problem with having the ebuild put rc_need in the conf.d configuration file set to default on instead of making the user add it?
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2012-10-28 06:08:48 UTC
I'm actually okay with Mike. There are corner cases for this, but for instance on LXC you're _not_ supposed to use ntp-client at all, so that's not one of them.

For NFS root, the easy way out would be to set rc_need="!net".

On the other hand... what about making it "after net"?
Comment 6 SpanKY gentoo-dev 2012-11-11 05:51:57 UTC
(In reply to comment #4)

you skipped the "reasonable default" part of my reply

(In reply to comment #5)

"after net" should be fine
Comment 7 SpanKY gentoo-dev 2012-11-11 05:58:31 UTC
should be all set now in the tree; thanks for the report!

Commit message: Change "need net" to "after net"
http://sources.gentoo.org/net-misc/ntp/files/ntp-client.rc?r1=1.11&r2=1.12
Comment 8 SpanKY gentoo-dev 2013-01-02 10:05:30 UTC
*** Bug 449696 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2013-12-07 09:17:56 UTC
*** Bug 463974 has been marked as a duplicate of this bug. ***
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-15 22:42:01 UTC
*** Bug 510406 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2015-04-08 20:53:40 UTC
*** Bug 532434 has been marked as a duplicate of this bug. ***