Bug 42211 - Apache is stopped during UCS appliance with update from 4.1-0 to 4.1-3
Summary: Apache is stopped during UCS appliance with update from 4.1-0 to 4.1-3
Status: RESOLVED WONTFIX
Alias: None
Product: UCS
Classification: Unclassified
Component: UMC - Setup wizard
Version: UCS 4.1
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UMC maintainers
QA Contact: UMC maintainers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 14:30 CEST by Alexander Kläser
Modified: 2019-01-03 07:18 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key 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.114
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016092721000105
Bug group (optional): Troubleshooting, Usability
Customer ID:
Max CVSS v3 score:


Attachments
Screenshot of the setup wizard session with JS console (295.85 KB, image/png)
2016-09-01 14:31 CEST, Alexander Kläser
Details
/var/log/univention/updater.log (112.86 KB, text/plain)
2016-09-01 14:33 CEST, Alexander Kläser
Details
/var/log/univention/setup.log (373.38 KB, text/plain)
2016-09-01 14:33 CEST, Alexander Kläser
Details
/var/log/univention/updater.log (293.46 KB, text/plain)
2016-09-01 15:03 CEST, Alexander Kläser
Details
/var/log/univention/setup.log (375.02 KB, text/plain)
2016-09-01 15:03 CEST, Alexander Kläser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2016-09-01 14:30:22 CEST
While running an UCS appliance from 4.1-0 with selected Update, I observed that apache was stopped somewhere during the update. The apache package status was at this time:

> iU  apache2-mpm-prefork                                 2.2.22-13.95.201603212007                    amd64        Apache HTTP Server - traditional non-threaded model
> ii  apache2-suexec                                      2.2.22-13.95.201603212007                    amd64        Standard suexec program for Apache 2 mod_suexec
> iU  apache2-utils                                       2.2.22-13.95.201603212007                    amd64        utility programs for webservers
> iU  apache2.2-bin                                       2.2.22-13.95.201603212007                    amd64        Apache HTTP Server common binary files
> iU  apache2.2-common                                    2.2.22-13.95.201603212007                    amd64        Apache HTTP Server common files
> ii  libapache2-mod-auth-pam                             1.1.1-9.27.201408261725                      amd64        module for Apache2 which authenticate using PAM
> ii  libapache2-mod-php5                                 5.4.45-0.216.201510081527                    amd64        server-side, HTML-embedded scripting language (Apache 2 module)
> iU  univention-apache                                   8.0.1-6.256.201601140838                     all          UCS - Apache2 configuration
Comment 1 Alexander Kläser univentionstaff 2016-09-01 14:31:24 CEST
Created attachment 7957 [details]
Screenshot of the setup wizard session with JS console

Here the message that is shown in the wizard.
Comment 2 Alexander Kläser univentionstaff 2016-09-01 14:33:23 CEST
Created attachment 7958 [details]
/var/log/univention/updater.log
Comment 3 Alexander Kläser univentionstaff 2016-09-01 14:33:36 CEST
Created attachment 7959 [details]
/var/log/univention/setup.log
Comment 4 Alexander Kläser univentionstaff 2016-09-01 14:38:28 CEST
Below an excerpt from updater.log ... it seems that we need to do something about the maintainer scripts of apche2-mpm-prefork:
---------- 8< ----------
[...]
Unpacking replacement openssh-client ...
Preparing to replace apache2-mpm-prefork 2.2.22-13.93.201510081517 (using .../apache2-mpm-prefork_2.2.22-13.95.201603212007_amd64.deb) ...
Stopping web server: apache2 ... waiting .
Unpacking replacement apache2-mpm-prefork ...
Preparing to replace apache2.2-common 2.2.22-13.93.201510081517 (using .../apache2.2-common_2.2.22-13.95.201603212007_amd64.deb) ...
Unpacking replacement apache2.2-common ...
[...]
Setting up apache2.2-common (2.2.22-13.95.201603212007) ...
Installing new version of config file /etc/init.d/apache2 ...
Setting up apache2-mpm-prefork (2.2.22-13.95.201603212007) ...
Starting web server: apache2.
Setting up curl (7.26.0-1.63.201510202222) ...
[...]
---------- 8< ----------
Comment 5 Alexander Kläser univentionstaff 2016-09-01 14:42:37 CEST
Apache is stopped in the prerm script and started in the postinst script.
Comment 6 Alexander Kläser univentionstaff 2016-09-01 15:03:04 CEST
Created attachment 7967 [details]
/var/log/univention/updater.log
Comment 7 Alexander Kläser univentionstaff 2016-09-01 15:03:22 CEST
Created attachment 7968 [details]
/var/log/univention/setup.log
Comment 8 Philipp Hahn univentionstaff 2016-09-02 11:07:18 CEST
(In reply to Alexander Kläser from comment #5)
> Apache is stopped in the prerm script and started in the postinst script.

PLEASE READ Bug #41203 comment 2 BEFORE EVER MUCKING WITH APACHE AGAIN!
Comment 9 Alexander Kläser univentionstaff 2016-09-07 14:44:51 CEST
(In reply to Philipp Hahn from comment #8)
> (In reply to Alexander Kläser from comment #5)
> > Apache is stopped in the prerm script and started in the postinst script.
> 
> PLEASE READ Bug #41203 comment 2 BEFORE EVER MUCKING WITH APACHE AGAIN!

As discussed, apache will surely run into problems if not being stopped in its prerm and started in its postinst after all of its dependencies have been updated.

Other alternatives:
* Access via JavaScript the UMC web server directly at its specific port.
* Try to re-route traffic to port 80 to UMC web server directly.
Comment 10 Florian Best univentionstaff 2016-09-07 14:48:53 CEST
(In reply to Alexander Kläser from comment #9)
> Other alternatives:
> * Access via JavaScript the UMC web server directly at its specific port.
The port is not exposed to the outside as the socket is bound to the 'lo' interface. Also in 4.2 this would bypass some security relevant HTTP response headers. And the UMC-Webserver expects to be behind a reverse proxy. The UMC-Webserver is also not available via HTTPS.
Comment 11 Alexander Kläser univentionstaff 2016-09-27 09:37:43 CEST
See Ticket#2016092721000105, the user was logged out during the setup process and during.
Comment 12 Florian Best univentionstaff 2016-09-27 11:26:53 CEST
(In reply to Alexander Kläser from comment #11)
> See Ticket#2016092721000105, the user was logged out during the setup
> process and during.
Hm, I don't think that the ticket is this bug. He spoke about session timeout and not about attachment 7957 [details].
Comment 13 Stefan Gohmann univentionstaff 2016-12-14 16:35:51 CET
It shouldn't affected so many users since we don't have a appliance on UCS 4.1-0 basis.

But it is still an important issue because it will always happen if we release a new Apache Erratum, right?
Comment 14 Alexander Kläser univentionstaff 2017-01-04 15:17:44 CET
Could this be a duplicated of Bug 42865?
Comment 15 Florian Best univentionstaff 2017-05-29 14:15:18 CEST
(In reply to Alexander Kläser from comment #14)
> Could this be a duplicated of Bug 42865?
I don't think so. The session timeout has nothing to do with Apache. But the problem might be similar: instead of that Apache is restarted the UMC-Webserver is restarted and all sessions lost → Our login dialog / authentication handling should be able to solve this.
Comment 16 Alexander Kläser univentionstaff 2017-07-21 09:56:19 CEST
To avoid these problems, we could update the apache package in the preup script. That would be a fairly simple workaround which also could be applied to 4.1-x releases.
Comment 17 Alexander Kläser univentionstaff 2017-07-21 10:15:10 CEST
(In reply to Stefan Gohmann from comment #13)
> It shouldn't affected so many users since we don't have a appliance on UCS
> 4.1-0 basis.
> 
> But it is still an important issue because it will always happen if we
> release a new Apache Erratum, right?

Yes, if we publish an erratum for apache, we will run into this problem again for people who are updating during the setup process. If the update consists of few packages, it will not be a problem. However, if the update takes several minutes, we will have the same problem.
Comment 18 Alexander Kläser univentionstaff 2017-07-21 11:00:02 CEST
(In reply to Alexander Kläser from comment #16)
> To avoid these problems, we could update the apache package in the preup
> script. That would be a fairly simple workaround which also could be applied
> to 4.1-x releases.

Note that preup probably will not work if an apache update is published as erratum. Another workaround could then be to define a pre-depends to apache2 for the package univention-management-console. However, this will only work if there is an update for univention-management-console and apache2 at the same time.
Comment 19 Alexander Kläser univentionstaff 2017-07-25 10:01:07 CEST
As discussed, technically it is not a problem that the Apache is stopped during the update. This is rather a usability problem as it might irritate a user to wait 5-15min with a progress bar being at 95% and nothing happens. Therefore, I remove the errata milestone.
Comment 20 Stefan Gohmann univentionstaff 2019-01-03 07:18:26 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.