Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480424 - ntp-client.service starts earlier than network connection is established
Summary: ntp-client.service starts earlier than network connection is established
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-09 19:15 UTC by Alexei Ababilov
Modified: 2013-08-09 20:19 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 Alexei Ababilov 2013-08-09 19:15:47 UTC
ntp-client.service starts /usr/sbin/ntpdate immediately, before network connection is established:

$ sudo systemctl status ntp-client.service 
ntp-client.service - Set time via NTP
   Loaded: loaded (/usr/lib64/systemd/system/ntp-client.service; enabled)
   Active: failed (Result: exit-code) since Fri 2013-08-09 21:26:12 EEST; 11min ago
  Process: 3294 ExecStart=/usr/sbin/ntpdate $NTPCLIENT_OPTS (code=exited, status=1/FAILURE)

Aug 09 21:26:19 toshiba.alessio.org ntpdate[3294]: Error resolving 0.gentoo.pool.ntp.org: Name or service not known (-2)
Aug 09 21:26:19 toshiba.alessio.org ntpdate[3294]: Error resolving 1.gentoo.pool.ntp.org: Name or service not known (-2)
Aug 09 21:26:19 toshiba.alessio.org ntpdate[3294]: Error resolving 2.gentoo.pool.ntp.org: Name or service not known (-2)
Aug 09 21:26:19 toshiba.alessio.org ntpdate[3294]: Error resolving 3.gentoo.pool.ntp.org: Name or service not known (-2)
Comment 1 Alexei Ababilov 2013-08-09 19:22:50 UTC
This is a proposed solution that uses Fedora's ntpdate-wrapper that runs ntpdate several times with a growing delay between attempts:

https://github.com/aababilov/portage/tree/master/net-misc/ntp
Comment 2 Alexei Ababilov 2013-08-09 20:19:23 UTC
Another solution is just to

sudo systemctl enable NetworkManager-wait-online.service