Bug 31844 - Update of univention-base-files restarts network
Update of univention-base-files restarts network
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-base-files
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Philipp Hahn
Sönke Schwardt-Krummrich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-28 09:20 CEST by Janis Meybohm
Modified: 2013-08-28 13:42 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
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 Janis Meybohm univentionstaff 2013-06-28 09:20:06 CEST
The update of univention-base-files somehow restarts the network interfaces. On systems using bonding, this leads to a complete shutdown of all bonding slaves and therefore the bonding interface itself.

We use DRBD (dual master) on top of that so as a result we got a split-brain situation on all DRBD resources.
Comment 1 Stefan Gohmann univentionstaff 2013-06-28 09:37:30 CEST
We should consider this before we update base-files again.
Comment 2 Philipp Hahn univentionstaff 2013-08-24 08:49:53 CEST
This is caused by
  /usr/sbin/univention-config-registry register univention-base-files
invoked during the postinst to register new and updated template files. This causes a commit on every handler, so to for the module conffiles/interfaces.py, which restarts the network stack.
This can be disabled by setting the UCRV interfaces/restart/auto=false.
IMHO the best thing to do would be to set i/r/a=false in the preup.sh and restore the setting in the postup.sh of any Release update.
In addition to that the variable might also be set in univention-base-files.preinst and restored in univention-base-files.postinst to prevent a network restart during the updated of the package.

The network stack is one of the few parts of UCR, which magically restarts services when UCRVs are modified. With nearly all other services we state, that an explicit restart of the service is required to activate configuration changes. So it would be best to get rid of the special module and just teach our users to restart the network manually after changing the UCRVs.
This is complicated by the following issue: To bring down the network as currently configured, the old configuration of /etc/network/interfaces is needed before the file is changed to the new configuration. This is currently achieved by the UCR module interfaces.py, which does a "ifdown $IFACE" in the pre-change and an "ifup $IFACE" in the post-change.
Comment 3 Stefan Gohmann univentionstaff 2013-08-26 07:29:31 CEST
(In reply to Philipp Hahn from comment #2)
> This is caused by
>   /usr/sbin/univention-config-registry register univention-base-files
> invoked during the postinst to register new and updated template files. This
> causes a commit on every handler, so to for the module
> conffiles/interfaces.py, which restarts the network stack.
> This can be disabled by setting the UCRV interfaces/restart/auto=false.
> IMHO the best thing to do would be to set i/r/a=false in the preup.sh and
> restore the setting in the postup.sh of any Release update.
> In addition to that the variable might also be set in
> univention-base-files.preinst and restored in univention-base-files.postinst
> to prevent a network restart during the updated of the package.

Yes, I think that would be the best way. We could think about the automatically restart of the network stack, but we should not change the default in an erratum.
Comment 4 Philipp Hahn univentionstaff 2013-08-26 14:02:36 CEST
3.1-1: svn43448 univention-base-files_2.0.15-2.141.201308261342
3.2-0: svn43447 univention-base-files_3.0.2-2.140.201308261342

ChangeLog, YAML: svn43450

During the update the automatic restart of the network is disabled by setting the &ucsUCRV; <envar>interfaces/restart/auto</envar> to <literal>false</literal>. 
In the past this has caused time-outs and re-connect problems.
The previous value is restored after the package univention-base-files has been updated successfully.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2013-08-27 11:40:30 CEST
(In reply to Philipp Hahn from comment #4)
> 3.1-1: svn43448 univention-base-files_2.0.15-2.141.201308261342
→ OK

> 3.2-0: svn43447 univention-base-files_3.0.2-2.140.201308261342
→ OK
 
> ChangeLog, YAML: svn43450
→ OK

A restart of interfaces has not been noticed.
Comment 6 Moritz Muehlenhoff univentionstaff 2013-08-28 13:42:52 CEST
http://errata.univention.de/ucs/3.1/176.html