Bug 48669 - Add more information in install tracking for Error 418 - DatabaseConnectorError
Add more information in install tracking for Error 418 - DatabaseConnectorError
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.4-0-errata
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-13 15:33 CET by Nico Gulden
Modified: 2019-05-15 14:52 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?: Yes
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 Nico Gulden univentionstaff 2019-02-13 15:33:42 CET
The installation error 418 DatabaseConnectorError does only provide the final error message and no information about the traceback. To avoid asking for the users logfile, the error value should provide more information.

Quite often delivered error values are:
* Returncode 2 for query
* Could not install software packages

This information is not enough to find the reason.
Comment 1 Dirk Wiesenthal univentionstaff 2019-04-24 12:40:40 CEST
"Returncode 2 for query":
  Probably related to an App that cleaned up some but not all of their database data. Thus, the error was found for second installations. Did not happen with later versions of the App. For now, nothing to do here.

"Could not install software packages":
  We now wait 120 seconds for a dpkg lock as this is the assumed error.

If the service does not start, we now send "service $dbms status" output.

univention-appcenter 8.0.11-14A~4.4.0.201904241125
Comment 2 Felix Botner univentionstaff 2019-05-03 10:18:19 CEST
There are a lot if those errors in the appcenter tests in http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-0/job/AutotestJoinReleased/

raise HTTPError(request, response, self.hostname)
(2019-05-02 13:41:00.997538) univention.lib.umc.BadRequest: 400 on master091.AutoTest091.local (command/appcenter/invoke): {"status": 400, "message": "Zur Zeit wird eine andere Paketverarbeitung durchgef\u00fchrt", "traceback": null, "location": "https://master091.AutoTest091.local/univention/command"} 

* so there are more errors now, hmm why?
* and the message is a message from us, wouldn't it be better to return stderr of 
  the installation command,
* also in my opinion something like "Zur Zeit wird eine andere 
  Paketverarbeitung durchgef\u00fchrt" should be handled by Univention/the 
  appcenter, just wait and retry
Comment 3 Dirk Wiesenthal univentionstaff 2019-05-10 14:46:24 CEST
Added /var/lib/apt/lists/lock to the lock files to test in
  univention-appcenter 8.0.11-17A~4.4.0.201905101429
Comment 4 Felix Botner univentionstaff 2019-05-13 12:23:25 CEST
please try the start of the service two times (return if first try succeeds, raise if second try fails)
Comment 5 Felix Botner univentionstaff 2019-05-13 12:27:07 CEST
and the apt/dpkg lock does not work as expected

started apt-get install univention-printserver

then univention-app install wordpress

univention-app install wordpress
Going to install WordPress (4.9.4)
Could not lock /var/lib/dpkg/lock or /var/lib/apt/lists/lock. Is another process using it? Waiting up to 120 seconds ->
Finally got the lock. Continuing...
OK:102 https://updates.software-univention.de/4.4/maintained 4.4-0/all/ Release
OK:103 https://updates.software-univention.de/4.4/maintained 4.4-0/amd64/ Release
OK:105 https://updates.software-univention.de/4.4/maintained/component 4.4-0-errata/all/ Release
OK:106 https://updates.software-univention.de/4.4/maintained/component 4.4-0-errata/amd64/ Release
Paketlisten werden gelesen...
E: Konnte Sperre /var/lib/dpkg/lock nicht bekommen - open (11: Die Ressource ist zur Zeit nicht verfügbar)
E: Sperren des Administrationsverzeichnisses (/var/lib/dpkg/) nicht möglich, wird es von einem anderen Prozess verwendet?
Could not install software packages
Aborting...
Going to remove WordPress (4.9.4)


the whole time the apt-get install is running
Comment 6 Dirk Wiesenthal univentionstaff 2019-05-14 14:52:40 CEST
Made it a little bit better by sleeping 3 seconds instead of 1, thereby reducing the window in which the lock is not taken by any of the "apt phases".

This is not a definitive solution, but an easy one and maybe enough to already reduce the error rate considerably.
Comment 7 Felix Botner univentionstaff 2019-05-15 11:17:16 CEST
OK - univention-appcenter
OK - yaml
OK - tests
Comment 8 Arvid Requate univentionstaff 2019-05-15 14:52:19 CEST
<http://errata.software-univention.de/ucs/4.4/96.html>