Your message dated Wed, 24 Jan 2018 22:22:05 +0000 with message-id <[email protected]> and subject line Bug#874540: fixed in ntp 1:4.2.8p10+dfsg-6 has caused the Debian Bug report #874540, regarding ntpdate vs ntp service lock not safe with systemd service to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 874540: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874540 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: ntp Version: 1:4.2.8p10+dfsg-5 Hi, this is a follow on to bug 806556 Back then you fixed it for sysv-init and I can confirm it worked great. But since recent versions the sysv script is no more used as there is a native systemd service. I carried forward your change in bug 806556 to the systemd wrapper and it works just fine - again locking the start of the service against potentially racing ntpdate ifup hook executions. If you agree, the following change should fix the issue: diff --git a/debian/ntp-systemd-wrapper b/debian/ntp-systemd-wrapper index 8d5d1f2..fead246 100755 --- a/debian/ntp-systemd-wrapper +++ b/debian/ntp-systemd-wrapper @@ -2,6 +2,7 @@ DAEMON=/usr/sbin/ntpd PIDFILE=/var/run/ntpd.pid +LOCKFILE=/run/lock/ntpdate if [ -r /etc/default/ntp ]; then . /etc/default/ntp @@ -17,5 +18,13 @@ if test "$(uname -s)" = "Linux"; then NTPD_OPTS="$NTPD_OPTS -u $UGID" fi -exec $DAEMON -p $PIDFILE $NTPD_OPTS +# Protect the service startup against concurrent ntpdate ifup hooks +( + if flock -w 180 9; then + exec $DAEMON -p $PIDFILE $NTPD_OPTS + else + echo "Timeout waiting for $LOCKFILE" + exit 1 + fi +) 9>$LOCKFILE -- Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd
--- End Message ---
--- Begin Message ---Source: ntp Source-Version: 1:4.2.8p10+dfsg-6 We believe that the bug you reported is fixed in the latest version of ntp, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Bernhard Schmidt <[email protected]> (supplier of updated ntp package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Wed, 24 Jan 2018 22:42:13 +0100 Source: ntp Binary: ntp ntpdate ntp-doc sntp Architecture: source Version: 1:4.2.8p10+dfsg-6 Distribution: unstable Urgency: medium Maintainer: Debian NTP Team <[email protected]> Changed-By: Bernhard Schmidt <[email protected]> Description: ntp - Network Time Protocol daemon and utility programs ntp-doc - Network Time Protocol documentation ntpdate - client for setting system time from NTP servers (deprecated) sntp - Network Time Protocol - sntp client Closes: 863873 874540 883949 887385 Changes: ntp (1:4.2.8p10+dfsg-6) unstable; urgency=medium . * Make sntp KoD path FHS-compliant. Thanks to Aaron Smith (Closes: #863873) * Drop historic Breaks/Pre-Depends * Drop historic conffile handling from pre-jessie * Adjust ntpdate description stating that it is deprecated * Move Vcs-* to salsa * Bump Standards-Version to 4.1.3.0, no changes necessary * Cherry-pick patch from upstream to increase stack size. Thanks to Frederic Endner-Dühr for testing (Closes: #887385) * Temporarily add ntpdate lock for systemd wrapper. Thanks to Christian Ehrhardt (Closes: #874540) * Add note about AppArmor tunable in README.Debian (Closes: #883949) Checksums-Sha1: 447374ff28672f805c1ff7ffc094f1d9c444f630 2346 ntp_4.2.8p10+dfsg-6.dsc 1b135c26852b90158a8d441c87b9f6cea5d22623 47416 ntp_4.2.8p10+dfsg-6.debian.tar.xz 9f42a060556488634c7ec00f8a8eae011e0fab80 7705 ntp_4.2.8p10+dfsg-6_amd64.buildinfo Checksums-Sha256: a9fc540de3cf8fcfead96a0327ac1eabb9eca53d78522b47bb2fe673c7f7b1fc 2346 ntp_4.2.8p10+dfsg-6.dsc 510d411f3fabba68366f3d3681e66aeed07ae90fbfead61912b34898ab970930 47416 ntp_4.2.8p10+dfsg-6.debian.tar.xz 9d0e9f0b43384e5d6e3a97c9e94db87a0d535be1fa188af77481dda62d240ad9 7705 ntp_4.2.8p10+dfsg-6_amd64.buildinfo Files: 718e60fab6620de8f794d030788519cf 2346 net optional ntp_4.2.8p10+dfsg-6.dsc eadf69c923b318265b67df4e22d4d7a7 47416 net optional ntp_4.2.8p10+dfsg-6.debian.tar.xz fe2f1a403cad4c1307dedebc61ae9e44 7705 net optional ntp_4.2.8p10+dfsg-6_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEE1uAexRal3873GVbTd1B55bhQvJMFAlppAWkRHGJlcm5pQGRl Ymlhbi5vcmcACgkQd1B55bhQvJPg0RAAlKrigkBiAgmmYOBGIUHLpUZhx2EdZDzD y5UjXDm23c3Q1l7B87vQg2LO1LbQdlDGKRiRvB2mIizIRBDg7/GVwsxduI9cnIz/ LWLwzsfzNoV5FgWrln/TwjsPbvMuSa6QCqRDCU+WYxImALpqtIRNmE3Q/qxRhSVC Tf6YJ4/UBbfc6EIPJmROtXMtnDpfeZ8GkHOnD/elPd4+x2E5UbnAfTZdRuGt29JL 4/agtyXe4CXirXrRYIedx4Q8BPkCQcVetGmUPc2A2DbMYj1whuocHonA+p2zAJT/ XnodIh65wlEmx/9GcGqzWFBwPw2vFearmuU6yQHuO4QwQgMk3JhSI0IqBLhPgfie XRT8cW8D9rQKuYbAfXe3yTbrxglXbSX5xKvEFv/fvRY4rLOgGNl86RAotarjgmqV 6h2750qSjJDpTXVbEYvRbnmAYXrv5jnztGNn1j/rvhF0RhHw/MJwSBedOyk82hsa E75twPUu5J8X121XRLhAYNb0MyaLZFeb3EI+sahxeqpJA/R+sZZeJ6EYptXa64c+ ORN+PneaXG6CWMnSbZnm9r0+XLh+s0cow+Pt3KkWbn+f5E4e5LUor27cD3VohF8Z XPGq1Uu8y2Wi0+fjyzSw1wkvQqpPkqS22YC6Mqz0qGanmqypLebxcDdZt4T5FuST KUJifJcDx/c= =/wGe -----END PGP SIGNATURE-----
--- End Message ---

