Hi Igor, first of all I beg your pardon that this was dormant for so long - 
just too many issues to pick from and NTP was long neglected for having so many 
issues we didn't want Delta but Debian didn't update. After Stretch was 
released NTP moved again in Debian, so if we need/want to change there as well 
it seems better now.
Also part of this reluctance is due to systemd timedatectl >> ntpdate 
(deprecated and causing all kind of trouble) and such.
Anyway - time to tackle things - and thanks for your debugging and suggestion 
already!

The particular change you suggested moves it from SysV to systemd which
is fine for Ubuntu, but might be an issue to Debian who still allow to
switch to SysV.

To re-triage the current state I checked this out once more on Xenial (as 
reported) and Artful.
Both still run systemctl from the generated service based on sysV 
/etc/init.d/ntp.

Just installing NTP has a running service after install:
- On both releases a invoke-rc.d ntp stop stops it properly
- On both releases a invoke-rc.d ntp start starts it properly again
- Rebooting (without ntpdate installed yet) works just fine, service running

Installing ntpdate and retrying:
- after boot the service is up in xenial and artful
- On both releases a invoke-rc.d ntp stop stops it properly
- On both releases a invoke-rc.d ntp start starts it properly again

Weird, unable to confirm or reproduce your issue.
But I remember we discussed and changed things around there - (waking up my 
memory).
Checking the ifup hook confirmed that - the stop/start is gone anyway in the 
newer release.

... Yeah memory was right I fixed that in Artful on the merge because
this thing was way more complex and error prone than its benefit - one
can check details at [1].

I need to backport that to X/Y/Z - preparing for that now ...

[1]: https://git.launchpad.net/~usd-import-
team/ubuntu/+source/ntp/commit/?id=943814aa43eb5915f4b643cd48061b3a7e4c75f8

** Changed in: ntp (Ubuntu)
       Status: Confirmed => Fix Released

** Also affects: ntp (Ubuntu Yakkety)
   Importance: Undecided
       Status: New

** Also affects: ntp (Ubuntu Zesty)
   Importance: Undecided
       Status: New

** Also affects: ntp (Ubuntu Xenial)
   Importance: Undecided
       Status: New

-- 
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 Xenial:
  Triaged
Status in ntp source package in Yakkety:
  Triaged
Status in ntp source package in Zesty:
  Triaged

Bug description:
  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     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to