[time-admin] Doesn't restart ntpd after changing time servers

Bug #245192 reported by Paul Smith
Affects Status Importance Assigned to Milestone
gnome-system-tools (Ubuntu)

Bug Description

Binary package hint: gnome-system-tools

Running Hardy with all the latest updates.

I have NTP installed and working. I wanted to change my time servers to use ones local to my network, instead of the default Ubuntu time server. I opened time-admin (System->Administration->Time and Date) and unlocked it. I clicked the "Select Servers" button next to "Time Servers:". I unchecked the existing time server and used "Add" to add two new ones; they were checked for me. I clicked "Close".

I checked /etc/ntp.conf and the new servers did appear to be configured properly there.

However, when I run "ntpq -p", even hours later, it's still using only the original time server; the newly configured servers are not used.

I ran "sudo /etc/init.d/ntp restart", and now my new time servers are being used properly.

time-admin needs to restart NTP when the server list is changed.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I can confirm this behaviour - changing the time server in time-admin correctly updates /etc/ntp.conf, but the NTP service is not restarted. The NTP service doesn't use the new server until it is restarted.

For completeness, steps to reproduce:

1) In a terminal, type 'ntpq -p' and note the server being used
2) Do a cat /etc/ntp.conf in the terminal and note the server being used
3) Open time-admin, unlock, click 'Select Servers', and then change the server you wish to use.
4) Do cat /etc/ntp.conf again, comparing the result to that obtained in step 2). Note that the server is updated correctly.
5) Do 'ntpq -p' again, comparing the result to that obtained in step 1). Note that the old server is still being used.
6) Do /etc/init.d/ntp restart
7) Compare the output of 'ntpq -p' to that obtained in step 5). Note that the new server is now being used.

chr1s@chris-desktop:~$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04
chr1s@chris-desktop:~$ apt-cache policy gnome-system-tools
  Installed: 2.22.0-0ubuntu9
  Candidate: 2.22.0-0ubuntu9
  Version table:
 *** 2.22.0-0ubuntu9 0
        500 http://archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

Changed in gnome-system-tools:
status: New → Confirmed
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

This could be solved with the same changes as what bug 62745 requires: stopping ntp, running ntpdate, and restarting ntp. This simply needs some thought since the NTP backend doesn't know anything about services, so we need to make the GUI do the work for it in tight integration.

Changed in gnome-system-tools (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
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.