Bug 43323

Summary: docker execute $app mktemp seems to be unreliable
Product: UCS Reporter: Dirk Wiesenthal <wiesenthal>
Component: App CenterAssignee: App Center maintainers <appcenter-maintainers>
Status: RESOLVED DUPLICATE QA Contact: App Center maintainers <appcenter-maintainers>
Severity: normal    
Priority: P5 CC: best
Version: UCS 4.1   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=43151
https://forge.univention.org/bugzilla/show_bug.cgi?id=43245
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:

Description Dirk Wiesenthal univentionstaff 2017-01-10 17:43:09 CET
We have seen several tracebacks where it seems a simple temporary was not created.

error_file = docker.execute_with_output('mktemp').strip()
or
password_file = docker.execute_with_output('mktemp').strip()

seem to return '' from time to time. Thus, this or something similar happens:

Traceback (most recent call last):
  File "/usr/bin/univention-app", line 90, in <module>
    main()
  File "/usr/bin/univention-app", line 77, in main
    ret = args.func(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 191, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install.py", line 67, in main
    return self.do_it(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install_base.py", line 109, in do_it
    self._do_it(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_install.py", line 65, in _do_it
    ret = super(Install, self)._do_it(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install.py", line 82, in _do_it
    if self._install_app(app, args):
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_install.py", line 61, in _install_app
    self._setup_docker_image(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_install.py", line 83, in _setup_docker_image
    process = self._execute_container_script(app, 'setup', args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_base.py", line 117, in _execute_container_script
    with open(docker.path(password_file), 'w') as f:
IOError: [Errno 21] Ist ein Verzeichnis: '/var/lib/docker/overlay/a7f2d5471e998c31b7f4321aac42be92faa11df55d00510dc79f916a528cff8a/merged/'


My guess that the call fails due to heavy load. But in this case the traceback shown is not helpful. We should create the file in Python using NamedTemporaryFile. Maybe the tracebacks just go away. Maybe we get a better understanding what the real problem is.
Comment 1 Florian Best univentionstaff 2017-01-10 17:57:17 CET
This is a duplicate of Bug #43151 or Bug #43245 ?!
Comment 2 Dirk Wiesenthal univentionstaff 2017-01-10 20:42:44 CET
This is exactly the Bug I had in mind. I did not find it.

*** This bug has been marked as a duplicate of bug 43151 ***