Bug 32481 - remove unnecessary ntpd restarts on interface change
remove unnecessary ntpd restarts on interface change
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Network
UCS 4.1
Other Linux
: P2 minor (vote)
: UCS 4.1-x
Assigned To: UCS maintainers
:
: 32178 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-04 15:55 CEST by Philipp Hahn
Modified: 2019-01-03 07:19 CET (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.091
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017020921000516
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 Philipp Hahn univentionstaff 2013-09-04 15:55:13 CEST

    
Comment 1 Philipp Hahn univentionstaff 2013-09-04 16:11:00 CEST
1. There is be a change in Debian Wheezy in the calling convention of the /etc/network/if-*.d/ scripts:
$ man interfaces
> When ifupdown is being called with the --all option, ... i[t] calls all the hook scripts ... with IFACE set to "--all", ...

diff --git a/branches/ucs-3.2/ucs-3.2-0/base/univention-network-manager/etc/network/ucs-network-tools b/branches/ucs-3.2/ucs-3.2-0/base/univention-network-manager/etc/network/ucs-network-tools
index ff70298..ab1e5a1 100644
--- a/branches/ucs-3.2/ucs-3.2-0/base/univention-network-manager/etc/network/ucs-network-tools
+++ b/branches/ucs-3.2/ucs-3.2-0/base/univention-network-manager/etc/network/ucs-network-tools
@@ -3,7 +3,7 @@
 # Univention Network Manager
 #  network script helper functions
 #
-# Copyright 2009-2012 Univention GmbH
+# Copyright 2009-2013 Univention GmbH
 #
 # http://www.univention.de/
 #
@@ -31,7 +31,7 @@
 # <http://www.gnu.org/licenses/>.
 
 ucs_ignore_interface () {
-	if [ "$IFACE" = "lo" -o "$IFACE" = "all" ]; then
+	if [ "$IFACE" = "lo" -o "$IFACE" = "--all" ]; then
 		exit 0
 	fi
 }

2. On servers with more than one "eth0", (bridging, bond, vlans), a lot of services are restarted multiple times, once for each interface:

 bind9:
  should use "rndc reload" instead of a "restart", which is a lot faster and also picks up removed/new interfaces:
   rm /etc/network/if-*.d/bind9
   tail -f /var/log/daemon.log &
   ifdown eth0 ; ip a flush eth0 ; rndc reload
   ifup eth0 ; rndc reload
Sep  4 15:54:25 bug23670 named[27189]: listening on IPv4 interface eth0, 10.200.17.30#53

 ntpd:
  NTPd picks up new and gone interfaces itself after some time automatically, so no special handling is needed.
   rm /etc/network/if-*.d/*date
Sep  4 15:58:51 bug23670 ntpd[24890]: Deleting interface #14 eth0, fe80::5054:ff:fe52:4145#123, interface stats: received=0, sent=0, dropped=0, active_time=300 secs
Sep  4 15:58:51 bug23670 ntpd[24890]: Deleting interface #13 eth0, 10.200.17.30#123, interface stats: received=1, sent=1, dropped=4, active_time=300 secs
Sep  4 15:58:51 bug23670 ntpd[24890]: 192.168.0.240 interface 10.200.17.30 -> (null)
...
Sep  4 16:03:51 bug23670 ntpd[24890]: Listen normally on 15 eth0 10.200.17.30 UDP 123
Sep  4 16:03:51 bug23670 ntpd[24890]: Listen normally on 16 eth0 fe80::5054:ff:fe52:4145 UDP 123


 listener, notifier:
  TBD...
Comment 2 Janek Walkenhorst univentionstaff 2013-09-19 12:41:30 CEST
(In reply to Philipp Hahn from comment #1)
>  ntpd:
>   NTPd picks up new and gone interfaces itself after some time
> automatically, so no special handling is needed.
Indeed this seems to work pretty well. As such I suggest removing
 /etc/network/if-down.d/00_rdate
 /etc/network/if-up.d/05_rdate
because those unnecessary restarts only hinder NTPd.
Also
 /etc/network/if-up.d/ntpdate
should be removed because ntpdate is not useful with NTPd. (Or maybe changed to only act when NTPd is not installed/in use)
Comment 3 Janek Walkenhorst univentionstaff 2013-09-19 12:46:53 CEST
(In reply to Janek Walkenhorst from comment #2)
> Also
>  /etc/network/if-up.d/ntpdate
> should be removed because ntpdate is not useful with NTPd.
This is from the Debian package "ntpdate".
> (Or maybe changed
> to only act when NTPd is not installed/in use)
This is already the case:
 /usr/sbin/ntpdate-debian -b
 19 Sep 12:45:18 ntpdate[32140]: the NTP socket is in use, exiting
Comment 4 Janek Walkenhorst univentionstaff 2013-10-30 18:21:51 CET
*** Bug 32178 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Gohmann univentionstaff 2019-01-03 07:19:04 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.