Bug 55283 - AppCenter error handling for docker pull is broken
AppCenter error handling for docker pull is broken
Status: NEW
Product: UCS
Classification: Unclassified
Component: App Center
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-10-18 12:42 CEST by Florian Best
Modified: 2022-10-18 12:42 CEST (History)
0 users

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 Florian Best univentionstaff 2022-10-18 12:42:44 CEST
The error handling in the appcenter for docker pull seems to not work on network problems:

management/univention-appcenter/python/appcenter-docker/docker.py:              ret, out = call_process2(['docker', 'pull', self.image], logger=_logger)
management/univention-appcenter/python/appcenter-docker/docker.py-              if ret != 0:
management/univention-appcenter/python/appcenter-docker/docker.py-                      raise DockerImagePullFailed(image=self.image, out=out, code=ret)


https://univention-dist-jenkins.k8s.knut.univention.de/job/UCS-5.0/job/UCS-5.0-2/job/AutotestUpgrade/131/SambaVersion=s4,Systemrolle=member/testReport/20_appcenter/100_settings/test_string_setting_docker/
failed due to this but maskes error handling.
Traceback:
Traceback (most recent call last):
  File "/usr/share/ucs-test/20_appcenter/100_settings.py", line 391, in test_password_setting_docker
    assert not os.path.exists(password_file)
  File "/usr/lib/python3.7/genericpath.py", line 19, in exists
    os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType


while the log shows:
Creating /etc/init.d/docker-app-apache
Adding localhost to LDAP object
Reloading apache2 configuration (via systemctl): apache2.service.
Registering the container host apach-91198863 for apache
Downloading app image docker-test.software-univention.de/httpd:2.4.23-alpine
Login Succeeded
Running command: docker pull docker-test.software-univention.de/httpd:2.4.23-alpine
Error response from daemon: Get https://docker-test.software-univention.de/v2/httpd/manifests/2.4.23-alpine: net/http: TLS handshake timeout
Resolving dependencies for apache
Going to remove Apache (2.4)
Showing README for apache=2.4
Configuring apache=2.4