Bug 46071 - ntp not running after installtion (and reboot)
ntp not running after installtion (and reboot)
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: General
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Jürn Brodersen
Felix Botner
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-01-17 16:54 CET by Felix Botner
Modified: 2018-03-14 14:38 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2018-01-17 16:54:09 CET
after the first reboot of a newly installed 4.3, ntp is not running

systemctl status ntp.service 
● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-01-17 16:43:16 CET; 8min ago
     Docs: man:systemd-sysv-generator(8)
 Main PID: 1288 (code=exited, status=1/FAILURE)
      CPU: 49ms

Jan 17 16:43:16 master systemd[1]: ntp.service: PID file /var/run/ntpd.pid not readable (yet?) after start: No such file or directory
Jan 17 16:43:16 master ntpd[1288]: proto: precision = 0.052 usec (-24)
Jan 17 16:43:16 master systemd[1]: Started LSB: Start NTP daemon.
Jan 17 16:43:16 master ntpd[1288]: MS-SNTP signd operations currently block ntpd degrading service to all clients.
Jan 17 16:43:16 master ntpd[1288]: unable to bind to wildcard address :: - another process may be running - EXITING
Jan 17 16:43:16 master systemd[1]: ntp.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 16:43:16 master ntp[1294]: Stopping NTP server: ntpdstart-stop-daemon: warning: failed to kill 1288: No such process
Jan 17 16:43:16 master ntp[1294]: .
Jan 17 16:43:16 master systemd[1]: ntp.service: Unit entered failed state.
Jan 17 16:43:16 master systemd[1]: ntp.service: Failed with result 'exit-code'.
Comment 1 Jürn Brodersen univentionstaff 2018-02-06 13:18:59 CET
I can't really reproduce this.
According to:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788014
this happens then ntpdate is running at same time.
(started by /etc/network/if-up.d/ntpdate)
That should have been prevented by a lock file.

univention-base-files overrides /etc/init.d/ntp that uses "lockfile-create" while  /etc/network/if-up.d/ntpdate uses "flock" for the lockfile.  That might be the problem.

Init scripts do not need the ucr autostart logic anymore. The ntp service will be masked in systemd if ntp/autostart=no is set.
I think it should be ok to use the upstream init script from stretch. That should hopefully solve the problem.
Comment 2 Jürn Brodersen univentionstaff 2018-02-06 13:39:28 CET
da56e3dc: remove init script from univention-base-files
17935fdb: changelog

Notes:
The path "/run/ntp.conf.dhcp" was changed in "/etc/dhcp/dhclient-exit-hooks.d/ntp" as well.

The "bind(21) AF_INET6 ... flags 0x11 failed: Cannot assign requested address" doesn't seem to be critical and can be ignored:
https://bugs.ntp.org/show_bug.cgi?id=2792
Comment 3 Jürn Brodersen univentionstaff 2018-02-08 17:04:17 CET
d3740bc8: Remove ucslint override for ntp init script
Comment 4 Felix Botner univentionstaff 2018-02-08 19:15:33 CET
there was a check 

-               # check ucr autostart setting
-               if [ -f "/usr/share/univention-config-registry/init-autostart.lib" ]; then
-                   . "/usr/share/univention-config-registry/init-autostart.lib"
-                   check_autostart ntp ntp/autostart
-               fi


in the our ntp init script, i think we have to update our template or add the check to the ntp packages init script.
Comment 5 Jürn Brodersen univentionstaff 2018-02-09 11:50:04 CET
(In reply to Felix Botner from comment #4)
> there was a check 
> 
> -               # check ucr autostart setting
> -               if [ -f
> "/usr/share/univention-config-registry/init-autostart.lib" ]; then
> -                   .
> "/usr/share/univention-config-registry/init-autostart.lib"
> -                   check_autostart ntp ntp/autostart
> -               fi
> 
> 
> in the our ntp init script, i think we have to update our template or add
> the check to the ntp packages init script.

Not needed in 4.3 (and I think in 4.2 neither) anymore.
Services can be registered in ucr inside:
debian/$PACKAGE_NAME.univention-service
ucr then uses systemctl to manage the autostart.
Comment 6 Felix Botner univentionstaff 2018-02-09 12:18:21 CET
(In reply to Jürn Brodersen from comment #5)
> (In reply to Felix Botner from comment #4)
> > there was a check 
> > 
> > -               # check ucr autostart setting
> > -               if [ -f
> > "/usr/share/univention-config-registry/init-autostart.lib" ]; then
> > -                   .
> > "/usr/share/univention-config-registry/init-autostart.lib"
> > -                   check_autostart ntp ntp/autostart
> > -               fi
> > 
> > 
> > in the our ntp init script, i think we have to update our template or add
> > the check to the ntp packages init script.
> 
> Not needed in 4.3 (and I think in 4.2 neither) anymore.
> Services can be registered in ucr inside:
> debian/$PACKAGE_NAME.univention-service
> ucr then uses systemctl to manage the autostart.
ok, i wasn't aware of that

OK - ntp process test
OK - changelog
Comment 7 Stefan Gohmann univentionstaff 2018-03-14 14:38:49 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".