As discussed on IRC:
- the default of -g is also going along with a default of jumping any time >a
threshhold ONCE.
-x can change that
To be sure I tested that on Xenial:
$ timedatectl
Local time: Thu 2017-06-29 15:58:29 UTC
Universal time: Thu 2017-06-29 15:58:29 UTC
RTC time: Thu 2017-06-29 15:58:29
Time zone: Etc/UTC (UTC, +0000)
Network time on: yes
NTP synchronized: yes
RTC in local TZ: no
ubuntu@x-ntp-skip-test:~$ sudo timedatectl set-ntp false
ubuntu@x-ntp-skip-test:~$ sudo timedatectl set-time 01:02:03
ubuntu@x-ntp-skip-test:~$ timedatectl
Local time: Thu 2017-06-29 01:02:05 UTC
Universal time: Thu 2017-06-29 01:02:05 UTC
RTC time: Thu 2017-06-29 01:02:05
Time zone: Etc/UTC (UTC, +0000)
Network time on: no
NTP synchronized: no
RTC in local TZ: no
$ sudo add-apt-repository ppa:ci-train-ppa-service/2828
[...]
$ sudo apt install ntp
[...]
$ systemctl status ntp
● ntp.service - LSB: Start NTP daemon
Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
Active: active (running) since Thu 2017-06-29 01:04:36 UTC; 14h ago
[...]
$ timedatectl
Local time: Thu 2017-06-29 16:02:50 UTC
Universal time: Thu 2017-06-29 16:02:50 UTC
RTC time: Thu 2017-06-29 01:05:33
Watch the time the service was started and the time it has now.
It it did warp once initially as it is intended.
If I skew the time later it will not instant-reset again.
Then I dropped the -g from the options to be sure it is this what makes it work
and it did not time warp anymore as expected - the offset is known but not
solved.
$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
[...]
golf.zq1.de 192.53.103.103 2 u 51 64 1 13.436 5456358 5456358
And afterwards the service goes active (exited) as according to the -g doc the
daemon gives up without -g on too big time deltas.
That said I summarize - good to go on sponsoring trusty and with the
SRUs in that regard.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1593907
Title:
ntpdate startup routine prevents ntp service from launching up on
Ubuntu 16.04 server on system boot; manually starting ntp service
works: [FIX in DESCRIPTION], just need to apply it and release a new
version
Status in ntp package in Ubuntu:
Fix Released
Status in ntp source package in Trusty:
In Progress
Status in ntp source package in Xenial:
In Progress
Status in ntp source package in Yakkety:
In Progress
Status in ntp source package in Zesty:
In Progress
Bug description:
[Impact]
* Fixes several broken cases, those are:
* Case 1 - ntp configured to drift time slowly, but time jumping
- ntp is running and drifts time towards a target being way off
- an interface comes up
- stop ntpd
- warp time via ntpdate-debian (static interfaces will even set -b)
- (re-)start ntpd
- if users relied on non-time warp they are now in trouble
* Case 2 - ntp start/stop storms
- ntpd comes up normally
- the admin brings interfaces up/down rather often
- ntp is restarted very very often due to this for no reason
=> reason for bugs like debian 823533
* Case 3 - unintentional enablement of ntp
- ntpd is installed but disabled (for whatever reason)
- all is fine on any ifup/down
- one installs ntpdate, maybe even without realizing due to a depends
- now on the next ifup ntpd (or openntpd) will be started
* Solution, drop the broken Delta
[Test Case]
* Testing Case 2/3 as it is the easiest, case 1 needs a more complex
setup to cause the time drift but otherwise works the same way.
- install ntp and ntpdate
- stop ntp
- ifup/ifdown an interface multiple times; as simplification you can
also call /etc/network/if-up.d/ntpdate directly (not that this
spawns the change asnchronous and locks concurrency, so do that a
few times over the time of a minute or so)
- the service of ntp should still be stopped and not report plenty of
restarts
[Regression Potential]
* It improves a lot of cases (otherwise we wouldn't SRU), but there is
one regression potential I can see:
- users that relied on starting NTP later on after other interfaces
got up due to that code in ntpdate which did that as a side effect.
But that is outweigh by Case2/3 for the majority of users. And even
Case1 only hits this potential regression on e.g. late network
intialization, but in that case please remind that the default
(systemd timedatectl) would handle that.
- Since most users of ntp do not install ntpdate (which doesn't work
when ntp is active) we should be rather safe to assume that almost
no one should rely on that side effect.
- Furthermore this is a Ubuntu Delta for very long, cause issues (see
the references on the git commit) but never made it into Debian -
in that sense another indicator it isn't an important delta to
have.
[Other Info]
* The original intention "what if net is available too late" fixed
correctly would not be part of ntpdate, but ntp and additionally
check if it is actually meant to be enabled - but I never seen/heard
of any of it since systemd is around - maybe new ordering mostly
avoids the original issue.
---
I've installed ntp service on the clean ubuntu 16.04 server system.
Configured it. Checked that it works, but, after reboot, it doesn't start
automatically.
When I check: 'systemctl is-enabled ntp', it shows enabled.
If I manually start it 'systemctl start ntp' it starts just fine and woks
correctly,
but until I manually start it, 'systemctl status ntp' shows:
Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
Active: inactive (deadi)
Installed 1.29ubuntu2 version of init-systems-helper, but it didn't
fix the problem.
Found a bugreport on ntpd package:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1577596
led to solution that involves a change to be made in file:
/etc/network/if-up.d/ntpdate
of ntpdate package
After changing from:
______________CODE_START______________
invoke-rc.d --quiet $service stop >/dev/null 2>&1 || true
# Avoid running more than one at a time
flock -n /run/lock/ntpdate /usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null
|| :
invoke-rc.d --quiet $service start >/dev/null 2>&1 || true
______________CODE_END______________
to:
______________CODE_START______________
systemctl --quiet stop $service.service >/dev/null 2>&1 || true
# Avoid running more than one at a time
flock -n /run/lock/ntpdate /usr/sbin/ntpdate-debian -s $OPTS 2>/dev/null
|| :
systemctl --quiet start $service.service >/dev/null 2>&1 || true
______________CODE_END______________
ntpd service started launching on boot.
System Information:
lsb_release -rd:
Description: Ubuntu 16.04 LTS
Release: 16.04
apt-cache policy ntpdate:
ntpdate:
Установлен: 1:4.2.8p4+dfsg-3ubuntu5
Кандидат: 1:4.2.8p4+dfsg-3ubuntu5
Таблица версий:
*** 1:4.2.8p4+dfsg-3ubuntu5 500
500 http://ru.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1593907/+subscriptions
--
Mailing list: https://launchpad.net/~touch-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp