Bug 44986 - IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/lib/docker/overlay/…/merged/etc/machine.secret'
IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/lib/docker/ov...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-1-errata
Assigned To: Eduard Mai
Dirk Wiesenthal
:
Depends on:
Blocks: 44987
  Show dependency treegraph
 
Reported: 2017-07-12 12:31 CEST by Felix Botner
Modified: 2019-09-30 11:05 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2016120321000091, 2016122221000153, 2016122221000199, 2016122221000331, 2017021621000217, 2017021621000413, 2017021621000468, 2017021721000181, 2017021721000555
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2017-07-12 12:31:40 CEST
+++ This bug was initially created as a clone of Bug #43151 +++

Version: 4.1-4 errata350 (Vahr)

Traceback(66ab21b01bd57cdc050e13e117734c49):
Die Ausführung des Kommandos appcenter/docker/progress ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 281, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 462, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 284, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 397, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 183, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 189, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/remove.py", line 48, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 108, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_remove.py", line 49, in _do_it
    super(Remove, self)._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/remove.py", line 54, in _do_it
    self._remove_app(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_remove.py", line 55, in _remove_app
    self._remove_docker_container(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_remove.py", line 59, in _remove_docker_container
    if self._backup_container(app, backup_data='move') is False:
  File "%PY2.7%/univention/appcenter/actions/docker_base.py", line 74, in _backup_container
    if not self._store_data(app):
  File "%PY2.7%/univention/appcenter/actions/docker_base.py", line 62, in _store_data
    process = self._execute_container_script(app, 'store_data', _credentials=False)
  File "%PY2.7%/univention/appcenter/actions/docker_base.py", line 132, in _execute_container_script
    with open(docker.path(error_file), 'r+b') as error_handle:
IOError: [Errno 2] Datei oder Verzeichnis nicht gefunden: '/var/lib/docker/overlay/c3560ded3e68efa1c6386decd48fdef39fdeb48033e6d6c5d7282e7fb53dc1dc/merged/tmp/tmp.kHPI9tHVWV'
Comment 1 Felix Botner univentionstaff 2017-07-12 12:36:48 CEST
One reason for this is if univention-appcenter-docker is installed
Comment 2 Felix Botner univentionstaff 2017-07-12 12:44:10 CEST
(In reply to Felix Botner from comment #1)
> One reason for this is if univention-appcenter-docker is installed

sorry, ignore this one

The Problem is if univention-docker ist *not* installed:

* UCS without univention-docker 
* install univention-docker | univention-appcenter-docker
* docker is installed during this process, but started with the default config
  (storage backend devicemapper)
* univention-docker creates a new /etc/default/docker and sets the 
  storage backend to overlay
* BUT, univention-docker does not restart docker, docker still operates with
  the devicemapper backend and the appcenters base directory for the container
  (/var/lib/docker/overlay/ID/merged) does not exists with this backend
* after a restart of docker everything is fine

bottom line: 
we have to restart docker in univention-docker 
(for new installation,  if [ -z "$2" ])
Comment 3 Felix Botner univentionstaff 2017-07-24 10:42:41 CEST
added a test (docker runs with overlayfs) in umc _test_for_docker_service and raise umcm.UMC_Error if not 

and restart docker in univention-docker during install (not update)
Comment 4 Eduard Mai univentionstaff 2017-08-10 17:30:12 CEST
Package: univention-docker
Version: 2.0.1-7A~4.2.0.201708101725
Branch: ucs_4.2-0
Scope: errata4.2-1

univention-docker.yaml:
r82034 | Bug #44986: use correct storage backend after new installations

univention-docker (2.0.1-7):
r82035 | Bug #44986: reread service file before dockerd restart in postinist
r82034 | Bug #44986: use correct storage backend after new installations
Comment 5 Dirk Wiesenthal univentionstaff 2017-08-22 01:13:51 CEST
Note that in 4.2, docker.io has overlay as the default storage backend. This Bug is not more relevant in 4.1.

That being said, it is still a reasonable change.
Comment 6 Arvid Requate univentionstaff 2017-08-23 14:35:28 CEST
<http://errata.software-univention.de/ucs/4.2/141.html>