Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 190098 - sys-apps/baselayout-2.0.0_rc3-r1+ net-misc/ntp-4.2.4_p0
Summary: sys-apps/baselayout-2.0.0_rc3-r1+ net-misc/ntp-4.2.4_p0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 21:50 UTC by Alon Bar-Lev (RETIRED)
Modified: 2007-09-04 07:10 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 Alon Bar-Lev (RETIRED) gentoo-dev 2007-08-24 21:50:21 UTC
Hello,
I do not know where the problem is... But on startup with RC_PARALLEL and  RC_DEPEND_STRICT and only lo registered in default, ntpd does not start.

The daemon is up, but fails to listed on the eth0 interface... /etc/init.d/ntpd reports daemon is down (although the process is up).

Restarting it after dhcp magic finishes makes it OK.

---

Aug 25 00:33:16 alon1 dhcpcd[7686]: eth0: dhcpcd 3.0.16 starting
Aug 25 00:33:16 alon1 dhcpcd[7686]: eth0: hardware address = 00:01:05:50:e0:70
Aug 25 00:33:16 alon1 dhcpcd[7686]: eth0: broadcasting for a lease
Aug 25 00:33:16 alon1 dnsmasq[7695]: read /etc/hosts - 7 addresses
Aug 25 00:33:17 alon1 ntpd[7720]: ntpd 4.2.4p0@1.1472-o Fri Jun 29 20:32:49 UTC 2007 (1)
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: offered 192.168.0.113 from 192.168.0.1
Aug 25 00:33:17 alon1 ntpd[7745]: precision = 1.000 usec
Aug 25 00:33:17 alon1 ntpd[7745]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Aug 25 00:33:17 alon1 ntpd[7745]: Listening on interface #1 wildcard, ::#123 Disabled
Aug 25 00:33:17 alon1 ntpd[7745]: Listening on interface #2 lo, ::1#123 Enabled
Aug 25 00:33:17 alon1 ntpd[7745]: failed to initialize interface for address fe80::201:5ff:fe50:e070
Aug 25 00:33:17 alon1 ntpd[7745]: Listening on interface #4 lo, 127.0.0.1#123 Enabled
Aug 25 00:33:17 alon1 ntpd[7745]: kernel time sync status 0040
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: leased 192.168.0.113 for 86400 seconds
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: no renewal time supplied, assuming 43200 seconds
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: no rebind time supplied, assuming 75600 seconds
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: adding IP address 192.168.0.113/24
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: adding route to 192.168.0.0 (255.255.255.0) via 0.0.0.0 metric 2004
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: removing route to 192.168.0.0 (255.255.255.0) via 0.0.0.0 metric 0
Aug 25 00:33:17 alon1 dhcpcd[7686]: eth0: adding default route via 192.168.0.1 metric 2004
Aug 25 00:33:18 alon1 ntpd[7745]: frequency initialized 0.000 PPM from /var/lib/ntp/ntp.drift
Aug 25 00:33:18 alon1 ntpd[7745]: Listening on interface #5 eth0, fe80::201:5ff:fe50:e070#123 Enabled
Aug 25 00:33:18 alon1 ntpd[7745]: Listening on interface #6 eth0, 192.168.0.113#123 Enabled

But then I can restart it:
Aug 25 00:35:54 alon1 ntpd[8040]: ntpd 4.2.4p0@1.1472-o Fri Jun 29 20:32:49 UTC 2007 (1)
Aug 25 00:35:54 alon1 ntpd[8041]: precision = 1.000 usec
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #1 wildcard, ::#123 Disabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #2 lo, ::1#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #3 vmnet1, fe80::250:56ff:fec0:1#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #4 eth0, fe80::201:5ff:fe50:e070#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #5 lo, 127.0.0.1#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #6 eth0, 192.168.0.113#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: Listening on interface #7 vmnet1, 192.168.150.1#123 Enabled
Aug 25 00:35:54 alon1 ntpd[8041]: kernel time sync status 0040
Aug 25 00:35:54 alon1 ntpd[8041]: frequency initialized 0.000 PPM from /var/lib/ntp/ntp.drift
Comment 1 dynamotwain 2007-08-25 23:54:45 UTC
With the same version of ntp, I had the same problem on one machine but not the other. The difference? ntp-client was in the default runlevel.

Adding ntp-client to the default runlevel as well as ntpd fixed it on the other machine. Since ntp-client starts before cron, I'm guessing it pushes network initialization earlier thus allowing ntpd to start successfully.
Comment 2 Duncan 2007-08-28 16:56:53 UTC
I'd suggest this be resolved/worksforme or invalid, as the issue is net dependencies, which work a bit different in baselayout-2 and you need to configure them locally as appropriate.

Try adding the following (set the net dependency as appropriate) to your /etc/conf.d/ntpd and/or ntp-client scripts:

RC_NEED="net.eth0"

You can also try RC_USE, RC_BEFORE and RC_AFTER tho the latter two may not work without the patch in bug #190045 (they aren't documented in -rc3-r1, but might be there).

FWIW, "need" sets a hard dependency, and will start it even if it's not in the same runlevel, while the others set soft dependencies, and will order correctly if in the same runlevel but won't start the dependencies if they are not.
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2007-08-28 17:53:21 UTC
I disagree.
ntp just like any other daemon should be (default) configured to listen on all available interfaces. It should not be affected if an interface is up or down at any period of time.
Also the current behavior when the daemon stay running but the service is reported as stopped is incorrect.
BTW: I have two interfaces (eth1, eth0) which one should be a dependency?
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-09-04 07:10:49 UTC
This should be fixed to some extent in rc4