Bug 44827 - CalledProcessError: Command 'docker inspect' returned non-zero exit status 1
CalledProcessError: Command 'docker inspect' returned non-zero exit status 1
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: App Center maintainers
App Center maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 13:13 CEST by Florian Best
Modified: 2021-07-16 20:36 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?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017061821000162, 2019070221000614, 2021071421000285
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 Florian Best univentionstaff 2017-06-20 13:13:15 CEST
Version: 4.2-0 errata45 (Lesum)

Execution of command 'appcenter/query' has failed:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 249, in execute
    function.__func__(self, request, *args, **kwargs)
  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 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 197, in query
    info = domain.to_dict(apps)
  File "%PY2.7%/univention/appcenter/actions/domain.py", line 109, in to_dict
    app_dict = get.to_dict(app)
  File "%PY2.7%/univention/appcenter/actions/docker_get.py", line 48, in to_dict
    ret['config'] = configure.list_config(app)
  File "%PY2.7%/univention/appcenter/actions/configure.py", line 131, in list_config
    _ucr = cls._get_app_ucr(app)
  File "%PY2.7%/univention/appcenter/actions/configure.py", line 106, in _get_app_ucr
    ucr_file = cls._get_app_ucr_filename(app)
  File "%PY2.7%/univention/appcenter/actions/configure.py", line 114, in _get_app_ucr_filename
    ucr_file = docker.path('/etc/univention/base.conf')
  File "%PY2.7%/univention/appcenter/docker.py", line 296, in path
    return os.path.join(self.root_dir, filename)
  File "%PY2.7%/univention/appcenter/docker.py", line 219, in root_dir
    self._root_dir = self.inspect_container()['GraphDriver']['Data']['MergedDir']
  File "%PY2.7%/univention/appcenter/docker.py", line 213, in inspect_container
    return inspect(self.container)
  File "%PY2.7%/univention/appcenter/docker.py", line 80, in inspect
    out = check_output(['docker', 'inspect', name])
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'inspect', '42f25e2312b9886f02dcf6dfcedb7d14aa4c9d04269e185ff73d246a78263b4b']' returned non-zero exit status 1
Comment 1 Dirk Wiesenthal univentionstaff 2017-07-03 11:51:15 CEST
Maybe we should actually output the message from docker inspect:

root@master80:~# docker inspect 96a85dc71c750c5377952dd1479b3003ba4a5e0c950c792105123ef03cb2687c
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

root@master80:~# docker inspect auidhsdkghs
Error: No such image, container or task: auidhsdkghs

This output should be sent to the frontend along with a "send error to Univention" button.
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:56:42 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 3 Christian Castens univentionstaff 2020-08-19 13:52:14 CEST
Reported again:

Version: 4.4-0 errata168 (Blumenthal)

Traceback(cf56b6607dc6949e0f31f3b9d5161149):
Internal server error during "appcenter/docker/progress".
Request: appcenter/docker/progress

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 260, in execute
    function.__func__(self, request, *args, **kwargs)
  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 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, 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 192, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 436, in invoke_docker
    result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 220, in call
    return obj.call_with_namespace(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/remove.py", line 56, in main
    return self.do_it(args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/install_base.py", line 119, in do_it
    self._do_it(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_remove.py", line 51, in _do_it
    super(Remove, self)._do_it(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/remove.py", line 64, in _do_it
    if not self._remove_app(app, args):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_remove.py", line 60, in _remove_app
    return self._remove_docker_container(app, args)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_remove.py", line 65, in _remove_docker_container
    if self._backup_container(app, remove=True) is False:
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_base.py", line 82, in _backup_container
    if not self._store_data(app):
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_base.py", line 67, in _store_data
    process = self._execute_container_script(app, 'store_data', credentials=False)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/actions/docker_base.py", line 103, in _execute_container_script
    container_interface_script = docker.path(interface_file)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 303, in path
    return os.path.join(self.root_dir, filename)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 218, in root_dir
    self._root_dir = self.inspect_container()['GraphDriver']['Data']['MergedDir']
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 212, in inspect_container
    return inspect(self.container)
  File "/usr/lib/python2.7/dist-packages/univention/appcenter/docker.py", line 72, in inspect
    out = check_output(['docker', 'inspect', str(name)])
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'inspect', '87922411eeb0c12b7156719f52303c6d763cbd75ac8f9712211bb5879be5b411']' returned non-zero exit status 1

Role: domaincontroller_master
Comment 4 Christian Castens univentionstaff 2021-07-16 20:36:52 CEST
Version: 4.4-8 errata1007 (Blumenthal)

Error:
Internal server error during "appcenter/docker/progress".
Request: appcenter/docker/progress

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 359, in __error_handling
    six.reraise(etype, exc, etraceback)
  File "%PY2.7%/univention/management/console/base.py", line 262, in execute
    function.__func__(self, request, *args, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 321, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 158, in progress
    ret = progress_obj.poll()
  File "%PY2.7%/univention/management/console/modules/mixins.py", line 102, in poll
    six.reraise(self.exc_info[1], None, self.exc_info[2])
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 312, in _thread
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 181, in _response
    return function(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 443, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 289, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 491, 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 220, in call
    return obj.call_with_namespace(namespace)
  File "%PY2.7%/univention/appcenter/actions/__init__.py", line 226, in call_with_namespace
    result = self.main(namespace)
  File "%PY2.7%/univention/appcenter/actions/upgrade.py", line 81, in main
    return self.do_it(args)
  File "%PY2.7%/univention/appcenter/actions/install_base.py", line 143, in do_it
    self._do_it(app, args)
  File "%PY2.7%/univention/appcenter/actions/docker_upgrade.py", line 113, in _do_it
    mode, detail = self._docker_upgrade_mode(app)
  File "%PY2.7%/univention/appcenter/actions/docker_upgrade.py", line 89, in _docker_upgrade_mode
    result = self._execute_container_script(app, 'update_available', credentials=False, output=True)
  File "%PY2.7%/univention/appcenter/actions/docker_base.py", line 103, in _execute_container_script
    container_interface_script = docker.path(interface_file)
  File "%PY2.7%/univention/appcenter/docker.py", line 303, in path
    return os.path.join(self.root_dir, filename)
  File "%PY2.7%/univention/appcenter/docker.py", line 218, in root_dir
    self._root_dir = self.inspect_container()['GraphDriver']['Data']['MergedDir']
  File "%PY2.7%/univention/appcenter/docker.py", line 211, in inspect_container
    return inspect(self.container)
  File "%PY2.7%/univention/appcenter/docker.py", line 73, in inspect
    out = check_output(['docker', 'inspect', str(name)])
  File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['docker', 'inspect', '5aa496d53cf0c45fc276a8ec2e674740ecaf78310c21271cd4b26bc13e175025']' returned non-zero exit status 1

Role: memberserver