Bug 31886 - Session should be kept active after installation/uninstallation
Session should be kept active after installation/uninstallation
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Dirk Wiesenthal
Alexander Kläser
: interim-1
Depends on: 31642
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-03 18:36 CEST by Dirk Wiesenthal
Modified: 2013-11-19 06:41 CET (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): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-07-03 18:36:05 CEST
The bug below keeps the session alive when asking to restart. But the App Center may have one dialog just before that: It lists errors during the installation, e.g. backup servers that were unreachable. This dialog does not ping and the session may run into a timeout.

Note that this holds for each case where errors may be shown just before the restart dialog. Whereever libServer.askRestart is used one should look into the code whether an error dialog may pop up before that.

If this happens to happen frequently one should find a more general solution like having a "ping argument" in dialog.confirm.

Please follow the example from libServer.askRestart and set the timeout relative to umc/http/session/timeout

+++ This bug was initially created as a clone of Bug #31642 +++

From Bug 28081, Comment 0
> ... 
> * Gut wäre es zudem, wenn die Session (bspw. über einen "Ping" mit dem
> UMC-Server wie in System-Setup) beim Erscheinen des Frage-Dialogs automatisch
> offen gehalten wird, so dass der Benutzer in jedem Fall die Möglichkeit hat,
> die Dienste neuzustarten.

Additionally, there may be the hint of a browser reload popping up. This hint should be blocked, as well.
Comment 1 Dirk Wiesenthal univentionstaff 2013-07-16 12:48:28 CEST
Fixed in
  univention-management-console-module-appcenter 3.0.6-1.150.201307161230

Found askRestart in
  univention-updater/umc/js/updater/ProgressPage.js
  univention-system-setup/umc/js/setup.js
  univention-management-console-module-appcenter/umc/js/appcenter/PackagesPage.js
  univention-join/umc/js/join.js

The only place where askRestart is prevented because of a session timeout is PackagesPage.js but it does not seem to be very critical. Extended Software Management is rarely used, quite fast (finishes within seconds) and the majority of packages do not require a restart of UMC, the code exists because of paranoia.
Comment 2 Alexander Kläser univentionstaff 2013-08-20 19:12:48 CEST
Changelog → OK (with minor adaption)

Session is left open via pinging and pinging is stopped after closing the confirmation dialogs. Little caveat, though: the timeout is not removed correctly upon closing the module... open the module and try:

> dijit.byId('umc_modules_appcenter_AppCenterPage_0')._afterAppOperation = true

→ REOPENED
Comment 3 Dirk Wiesenthal univentionstaff 2013-08-21 13:42:02 CEST
(In reply to Alexander Kläser from comment #2)
> Changelog → OK (with minor adaption)
> 
> Session is left open via pinging and pinging is stopped after closing the
> confirmation dialogs. Little caveat, though: the timeout is not removed
> correctly upon closing the module... open the module and try:
> 
> > dijit.byId('umc_modules_appcenter_AppCenterPage_0')._afterAppOperation = true
> 
> → REOPENED

This is not really a caveat: When the app center pings it is impossible to close the tab (only modal dialogs pop up). This error can only be simulated with a JS console.

Nevertheless I updated the code, made it more robust (I use timing.Timer now (like in system setup) because I wanted to see if the Timer stops automatically if the module is closed: It does not) and built
  univention-management-console-module-appcenter 3.0.17-1.169.201308211338
Comment 4 Alexander Kläser univentionstaff 2013-08-21 17:47:25 CEST
(In reply to Dirk Wiesenthal from comment #3)
> This is not really a caveat: When the app center pings it is impossible to
> close the tab (only modal dialogs pop up). This error can only be simulated
> with a JS console.
> 
> Nevertheless I updated the code, made it more robust (I use timing.Timer now
> (like in system setup) because I wanted to see if the Timer stops
> automatically if the module is closed: It does not) and built
>   univention-management-console-module-appcenter 3.0.17-1.169.201308211338

The problem is fixed, global behaviour is fine :) → VERIFIED

ps: This was a little caveat. Yes, the visible error could only be simulated with a JS console, however, after having started a ping loop once, the loop continued run after closing the module. Only the variable _afterAppOperation would surely be set to false, however, the setTimeout() loop continued... as you summarized in the last sentence :) .
Comment 5 Stefan Gohmann univentionstaff 2013-11-19 06:41:30 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

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