Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510406 - net-misc/ntp (/etc/init.d/ntp-client) should need net
Summary: net-misc/ntp (/etc/init.d/ntp-client) should need net
Status: RESOLVED DUPLICATE of bug 439564
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-15 14:44 UTC by Mark Keisler
Modified: 2014-05-21 16:29 UTC (History)
1 user (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 Mark Keisler 2014-05-15 14:44:21 UTC
/etc/init.d/ntp-client should "need" net rather than just "after."  If all interfaces fail to start, the system will hang on ntp-client.  I use ntpd -q for ntp-client.

Reproducible: Always

Steps to Reproduce:
1. rc-update add ntp-client default
2. disable or break your network interface init
3. reboot
Actual Results:  
system hang on ntp-client init

Expected Results:  
skip ntp-client since net is down.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-05-15 22:42:01 UTC

*** This bug has been marked as a duplicate of bug 439564 ***
Comment 2 Mark Keisler 2014-05-16 01:38:46 UTC
This is not a duplicate.  The cited bug broke the functionality that was there before and violated the principle of least surprise.  bug 439564 broke what was working for probably 99% of Gentoo users and requires them to make a modification to /etc/conf.d/ntp-client rather than the 1% doing something different having to modify /etc/conf.d/ntp-client - and this was done with not even a note in /etc/conf.d/ntp-client.  

Change it back or at the very least, add a comment to /etc/conf.d/ntp-client.
Comment 3 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-05-21 14:48:14 UTC
Having your interfaces break your boot is the principle of least surprise; if you want your system to boot regardless, make your system not depend on ntp-client.

For details wrt the "need net" removals, see the following gentoo-dev ML post:

    http://www.gossamer-threads.com/lists/gentoo/dev/261562
Comment 4 Mark Keisler 2014-05-21 15:19:55 UTC
I think that ntp-client is a special case because 
1. it is not actually a running daemon that will need to be restarted or stopped
2. it does not fork and remains in the foreground for its init. (does not use start-stop-daemon)

With the present situation, my interfaces breaking my boot means it hangs until I go to the actual console, give it the three finger salute and boot into single user mode.  Telling me to not use stable, useful software is not an answer.
Comment 5 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-05-21 15:51:01 UTC
(In reply to Mark Keisler from comment #4)
> I think that ntp-client is a special case because 
> 1. it is not actually a running daemon that will need to be restarted or
> stopped
> 2. it does not fork and remains in the foreground for its init. (does not
> use start-stop-daemon)

So, this case would hang when there is no net; which is why there is "after net" to ensure that it runs after the network has been set up, removing "after net" would still hang the boot given this case.

This is no different from what it would do if there were "need net" instead of "after net"; which has nearly no difference, as it only has some differences in term of restarting which does not pertain to a hanging boot.

> With the present situation, my interfaces breaking my boot means it hangs
> until I go to the actual console, give it the three finger salute and boot
> into single user mode.  Telling me to not use stable, useful software is not
> an answer.

For answers to support questions, like booting a system without net; you can find help on the Gentoo forums, mailing lists or #gentoo on the freenode IRC network.
Comment 6 Mark Keisler 2014-05-21 16:07:57 UTC
I beg to differ.  My only net interface besides loopback failed and ntp-client tried to start and hung with the default "after net".
Comment 7 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2014-05-21 16:29:28 UTC
(In reply to Mark Keisler from comment #6)
> I beg to differ.  My only net interface besides loopback failed and
> ntp-client tried to start and hung with the default "after net".

I assume there to be a bug elsewhere in the chain if that is the case.