Bug 45556 - setup/apps/query: OSError: [Errno 2] No such file or directory: '/var/cache/univention-appcenter/appcenter.software-univention.de/4.2/.apps.en.json'
setup/apps/query: OSError: [Errno 2] No such file or directory: '/var/cache/u...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-3
Assigned To: Dirk Wiesenthal
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-17 16:21 CEST by Florian Best
Modified: 2018-07-30 17:02 CEST (History)
2 users (show)

See Also:
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?: 3: A User would likely not purchase the product
User Pain: 0.206
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018072621000714, 2018022721000883, 2017122421000121, 2018011321000035, 2017120621000404, 2017120621000128, 2017112821000615, 2017112521000264, 2017101421000287, 2017111521000032
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-10-17 16:21:03 CEST
Version: 4.2-1 errata118 (Lesum)

Execution of command 'setup/apps/query wizard' 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/setup/__init__.py", line 725, in apps_query
    return util.get_apps(True)
  File "%PY2.7%/univention/management/console/modules/setup/util.py", line 774, in get_apps
    return [get.to_dict(app) for app in Apps().get_all_apps() if app.is_ucs_component()]
  File "%PY2.7%/univention/appcenter/app_cache.py", line 113, in get_all_apps
    for app in self.get_every_single_app():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 461, in get_every_single_app
    for app in app_cache.get_every_single_app():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 418, in get_every_single_app
    ret.extend(app_cache.get_every_single_app())
  File "%PY2.7%/univention/appcenter/app_cache.py", line 325, in get_every_single_app
    if self._save_cache():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 214, in _save_cache
    cache_modified = os.stat(cache_file).st_mtime
OSError: [Errno 2] No such file or directory: '/var/cache/univention-appcenter/appcenter.software-univention.de/4.2/.apps.en.json'
Comment 1 Johannes Keiser univentionstaff 2017-11-15 16:46:18 CET
 Version: 4.2-2 errata219 (Lesum)

Execution of command 'apps/get' has failed:



Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 250, 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/apps/__init__.py", line 60, in get
    app = Apps().find(application)
  File "%PY2.7%/univention/appcenter/app_cache.py", line 83, in find
    apps = self.get_all_apps_with_id(app_id)
  File "%PY2.7%/univention/appcenter/app_cache.py", line 70, in get_all_apps_with_id
    for app in self.get_every_single_app():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 501, in get_every_single_app
    for app in app_cache.get_every_single_app():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 458, in get_every_single_app
    ret.extend(app_cache.get_every_single_app())
  File "%PY2.7%/univention/appcenter/app_cache.py", line 344, in get_every_single_app
    if self._save_cache():
  File "%PY2.7%/univention/appcenter/app_cache.py", line 214, in _save_cache
    os.utime(cache_file, (archive_modified, archive_modified))
OSError: [Errno 2] No such file or directory: '/var/cache/univention-appcenter/appcenter.software-univention.de/4.1/.apps.en.json'
Comment 2 Dirk Wiesenthal univentionstaff 2017-11-21 16:59:36 CET
Fixed in
  univention-appcenter (6.0.10-22)

Looks like a timing issue where another process deleted the cache file (very small window, though).

Fixed by just catching the exception. The cache should be re-evaluated the next time it is accessed.
Comment 3 Felix Botner univentionstaff 2017-11-22 14:39:17 CET
please rebuild in ucs4.2-3
Comment 4 Dirk Wiesenthal univentionstaff 2017-11-23 17:52:21 CET
Rebuilt as
  univention-appcenter 6.0.11-1A~4.2.0.201711231631
Comment 5 Felix Botner univentionstaff 2017-11-24 14:04:41 CET
except EnvironmentError:

but the Traceback is OSError:

is this the same?
Comment 6 Florian Best univentionstaff 2017-11-24 14:10:52 CET
(In reply to Felix Botner from comment #5)
> except EnvironmentError:
> 
> but the Traceback is OSError:
> 
> is this the same?

yes, OSError and IOError inherits from EnvironmentError.
Comment 8 Felix Botner univentionstaff 2017-11-24 14:13:03 CET
tested in 4.2-2

OK - univention-appcenter
OK - changelog
Comment 9 Erik Damrose univentionstaff 2017-11-28 17:26:38 CET
UCS 4.2-3 has been released.
Comment 10 Johannes Keiser univentionstaff 2017-11-29 13:50:52 CET
Reported again: Version: 4.2-2 errata216 (Lesum)
Comment 11 Florian Best univentionstaff 2017-11-29 18:48:47 CET
Remark: This was the initial load and bootup of the ownCloud appliance for ESX running on version 6.5.
Comment 12 Johannes Keiser univentionstaff 2017-12-11 15:49:09 CET
Reported again: Version: 4.2-1 errata133 (Lesum)
Comment 13 Johannes Keiser univentionstaff 2017-12-11 15:50:43 CET
Reported again: Version: 4.2-2 errata216 (Lesum)
Comment 14 Johannes Keiser univentionstaff 2018-01-19 17:44:18 CET
Reported again:  Version: 4.2-2 errata216 (Lesum)
Comment 15 Johannes Keiser univentionstaff 2018-01-19 17:52:37 CET
Reported again: Version: 4.2-2 errata216 (Lesum)
Comment 16 Johannes Keiser univentionstaff 2018-03-29 20:23:57 CEST
Reported again: Version: 4.2-1 errata131 (Lesum)
Comment 17 Johannes Keiser univentionstaff 2018-07-30 17:02:17 CEST
Reported again: Version: 4.2-1 errata133 (Lesum)