Bug 44015

Summary: Failed docker installations due to apt lock
Product: UCS Reporter: Stefan Gohmann <gohmann>
Component: App CenterAssignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Dirk Wiesenthal <wiesenthal>
Severity: normal    
Priority: P5 CC: wiesenthal
Version: UCS 4.2   
Target Milestone: UCS 4.1-4-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 6: Setup Problem: Issue for the setup process
Who will be affected by this bug?: 2: Will only affect a few installed domains How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.274 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:
Bug Depends on:    
Bug Blocks: 44630, 45103, 45142    
Attachments: appcenter.log.bz2
ucs-test.log.bz2

Description Stefan Gohmann univentionstaff 2017-03-21 20:59:32 CET
The test cases show the following error (in this case 76_app_ports_redirect):
-----------------------------------------------------------------------------
Starting to download 3 file(s) directly
+ univention-app register dg679qmtiq --component
File: /etc/apt/apt.conf.d/55user_agent

++ univention-app get dg679qmtiq default_packages --values-only --shell
+ app_packages='telnetd proftpd'
+ univention-install -y telnetd proftpd
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
Setup script failed!
Aborting...
Going to remove dg679qmtiq (8.8.1)
-----------------------------------------------------------------------------

So, it seems the apt cache is locked.
Comment 1 Stefan Gohmann univentionstaff 2017-03-21 21:00:31 CET
Created attachment 8609 [details]
appcenter.log.bz2
Comment 2 Stefan Gohmann univentionstaff 2017-03-21 21:00:53 CET
Created attachment 8610 [details]
ucs-test.log.bz2
Comment 3 Dirk Wiesenthal univentionstaff 2017-04-05 13:58:45 CEST
This may be due to univention-upgrade running as a cron job just after the container start (depends on datetime)
Comment 4 Felix Botner univentionstaff 2017-05-18 10:28:11 CEST
disabled cron job, limited update_available to once per day

univention-docker-container-mode: 79414
univention-docker-container-mode.yaml
Comment 5 Dirk Wiesenthal univentionstaff 2017-06-06 17:47:21 CEST
I think update/container/check/* need to be reset after update_packages and update_release.

Also, can you please change

upgrade="$(univention-upgrade --check --setucr --disable-app-updates)"

to ditch stderr:
upgrade="$(univention-upgrade --check --setucr --disable-app-updates 2>/dev/null)"

This prevents this update/container/check/type:
The update to UCS 4.2 is blocked because the component 'dudle_20160201' is marked as required.
Comment 6 Felix Botner univentionstaff 2017-06-07 10:03:15 CEST
* added 2>/dev/null to univention-upgrade check
* unset update/container/check/* in update_packages and update_release
Comment 7 Dirk Wiesenthal univentionstaff 2017-06-16 12:15:08 CEST
Works great
Comment 8 Janek Walkenhorst univentionstaff 2017-06-21 17:01:10 CEST
<http://errata.software-univention.de/ucs/4.1/430.html>