ntpdate shouldn't be run by ifup on desktops (conflict with time-admin's NTP options)

Bug #585053 reported by Dimitri Bakalow
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntp (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: gnome-system-tools

$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

$ uname -a
Linux U-001 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux

$ apt-cache policy gnome-system-tools
gnome-system-tools:
Installed: 2.30.0-0ubuntu2
Candidate: 2.30.0-0ubuntu2

It would be logical to expect, that when the time setting is set to "Manual" in the time-admin, then time is really set manually, and there is no synchronisation over the network

However even then there are lines like this in the system log:

ntpdate[1364]: adjust time server 91.189.94.4 offset 0.099757 sec

It is like that even after the clean install, when this setting was on manual and clicking caused the message about the need to install NTP support to pop out. Interesting... ntp is not installed, but something is still trying to adjust the time with the server, on this IP, which happens to be ntp.ubuntu.com.

Even more interesting was to observe, that after installing the NTP support and changing the time-admin setting to "Keep synchronised with internet servers" and even after the selecting totally different servers, there is still this same line on the system log every time after establishing the network connection. Of course then I discovered that this is doings of ntpdate, which is installed by default as dependancy of ubuntu-minimal and has this same ntp.ubuntu.com in its configuration - and there is no way to see or change it from the user interface. Other solution could be of course dropping the dependancy in a way, that ntpdate would not be installed by default on standard desktop installation, but I am not sure, if this could brake something else and would therefore be impossible.

The server(s) defined in /etc/default/ntpdate are not visible from the user interface and there no way to configure them.

I really do not want to describe it as "calling home" (as the setting with ntp.ubuntu.com has no connection to user interface), but there is possibility, that someone else would.

In some places it could be even seen as security risk, when the system is connecting somewhere without any according configuration or the way to configure this...

Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

ntpdate is not supposed to be run all the time AFAIK, it's mainly here to allow synchronizing the clock manually (what the "Sync Now" button is time-admin does), and creating scripts to do that. On my box, syslog doesn't contain anything related to ntpdate... Can't you think of any package you may have installed? Does installing NTP via time-admin stop this?

Changed in gnome-system-tools (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
summary: - no user interface to configure ntpdate
+ ntpdate running in the background by default
Revision history for this message
Dimitri Bakalow (dimitri-bakalow) wrote : Re: ntpdate running in the background by default

As I said before, this appeares in syslog, when the network connection is established - I discovered it initially, when I was trying to "debug" the problems with the wireless connection on laptop.

The problem is not that the ntpdate runs all time in the background, but the script /etc/network/if-up.d/ntpdate does run every time when the network connection is established, as I explained before already.

There is one thing though - if ntp support is installed, then the selected servers are configurable from the time-admin, but the /etc/network/if-up.d/ntpdate is still invoked every time even when time settings is set to "Manual" from time-admin, although it respects the server selection made in time-admin (obviously from /etc/ntp.conf) and server selection from /etc/default/ntpdate is ignored.

All-in-all:

1. There is no way to prevent ntpdate to run every time, when network connection is established - setting to "Manual" in time-admin has no affect on this.
2. Servers can be selected after the installation of ntp support and this selection is then respected by the /etc/network/if-up.d/ntpdate script.

P.S. There is no "Synchronise now" button in time settings panel any more.

summary: - ntpdate running in the background by default
+ no user interface to configure whether time synchronisation is always
+ made on establishing the network connection.
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote : Re: no user interface to configure whether time synchronisation is always made on establishing the network connection.

But that's not a problem with time-admin, which is not supposed to control ntpdate at all. It's just that ntpdate shouldn't run by ifup when interfaces are enabled. Else, there's no point in optionally installing the ntp daemon.

I suspect ntpdate is not run when your connections are managed using NetworkManager instead of ifup, which could explain why this bug has gone unnoticed. If it's the case, that would be a workaround, anyway NetworkManager is the preferred way to handle connections on desktops now.

I don't think disabling ntpdate by default would hurt, no application should rely on it.

From https://help.ubuntu.com/10.04/serverguide/C/NTP.html:
> Ubuntu comes with ntpdate as standard, and will run it once at
> boot time to set up your time according to Ubuntu's NTP server.

So it may well be that server settings are used on desktops, where it doesn't really make sense, since we get an inconsistent behavior with the GUI.

affects: gnome-system-tools (Ubuntu) → ntp (Ubuntu)
Changed in ntp (Ubuntu):
status: Incomplete → Triaged
summary: - no user interface to configure whether time synchronisation is always
- made on establishing the network connection.
+ ntpdate shouldn't be run by ifup on desktops (conflict with time-admin's
+ NTP options)
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

OK, I've just found bug 322518 which is about the same issue.

Revision history for this message
Dimitri Bakalow (dimitri-bakalow) wrote :

I should note here, that this all happens, when connection is managed using NetworkManager - as if in clean unaltered install.

I put this bug initially under gnome-system-tools, because the situation is kind of misleading from the point of ordinary user - synchronisation takes place even when the user has not changed the setting from "Manual" to "Keep synchronised". Of course there is more than one way to fix this misleading situation. If we are considering the simplest - removing the dependency of ntpdate - then the bug should may be considered to be against package ubuntu-minimal, which brings the ntpdate in for standard install.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.