Bug 33035 - ucr commit /etc/apt/sources.list.d/* takes ages
ucr commit /etc/apt/sources.list.d/* takes ages
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 3.2-x
Assigned To: UCS maintainers
:
: 34989 (view as bug list)
Depends on:
Blocks: 33036 48832
  Show dependency treegraph
 
Reported: 2013-10-31 12:51 CET by Dirk Wiesenthal
Modified: 2019-03-01 12:46 CET (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 2: Improvement: Would be a product improvement
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.023
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018020121000903
Bug group (optional): UCS Performance
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2013-10-31 12:51:03 CET
... if a lot of components are registered. UMC commands that change ucr variables related to these files may even run into a timeout.

We should try to speed up the commit.
Comment 1 Philipp Hahn univentionstaff 2013-10-31 13:00:55 CET
1. Don't set UCR one-for-one, but all at once.
2. See Bug #25891 comment 1
Comment 2 Dirk Wiesenthal univentionstaff 2013-10-31 13:52:58 CET
(In reply to Philipp Hahn from comment #1)
> 1. Don't set UCR one-for-one, but all at once.

At least in UMC it is done this way and it is still slow.

> 2. See Bug #25891 comment 1

Ah, okay. Thanks

*** This bug has been marked as a duplicate of bug 25891 ***
Comment 3 Stefan Gohmann univentionstaff 2014-06-17 08:06:20 CEST
*** Bug 34989 has been marked as a duplicate of this bug. ***
Comment 4 Stefan Gohmann univentionstaff 2014-07-06 16:55:50 CEST
See Bug #33036 Comment #2:

> We should change at least the following things.
> 
> - don't recreate  /etc/apt/sources.list.d/15_ucs-online-version.list while
> setting components:
> 
> root@master211:~# ucr set repository/online/component/xrdp=yes
> repository/online/component/xrdp/server=$(hostname -f)
> Setting repository/online/component/xrdp
> Setting repository/online/component/xrdp/server
> File: /etc/apt/sources.list.d/20_ucs-online-component.list
> File: /etc/apt/mirror.list
> File: /etc/apt/sources.list.d/15_ucs-online-version.list
> 
> - maybe the app center can use a temporary sources list in dry_run mode
> 
> How long does the commit take in the problematic cases?
Comment 5 Dirk Wiesenthal univentionstaff 2014-08-18 12:24:07 CEST
We should also add some kind of timeout. A postinst script totally blocked (possibly forever). Cancelled it with Ctrl+C:

File: /etc/apt/sources.list.d/20_ucs-online-component.list
^CTraceback (most recent call last):
  File "<stdin>", line 16, in <module>
  File "/usr/lib/pymodules/python2.6/univention/updater/tools.py", line 1591, in print_component_repositories
Traceback (most recent call last):
  File "/usr/sbin/univention-config-registry", line 65, in <module>
    ub.main(convertToUtf8(sys.argv[1:]))
  File "/usr/lib/pymodules/python2.6/univention/config_registry/frontend.py", line 690, in main
    repos = self.get_component_repositories(component, versions, clean, for_mirror_list=for_mirror_list)
  File "/usr/lib/pymodules/python2.6/univention/updater/tools.py", line 1531, in get_component_repositories
    for server, ver in self._iterate_component_repositories([component], version, version, archs, for_mirror_list=for_mirror_list, errata_level=errata_level, iterate_errata=iterate_errata):
  File "/usr/lib/pymodules/python2.6/univention/updater/tools.py", line 1192, in _iterate_component_repositories
    for ver in self._iterate_versions(struct, version, version, parts, subarchs, server):
  File "/usr/lib/pymodules/python2.6/univention/updater/tools.py", line 1075, in _iterate_versions
    assert server.access(ver.path()) # minor
  File "/usr/lib/pymodules/python2.6/univention/updater/tools.py", line 437, in access
    res = UCSHttpServer.opener.open(req)
  File "/usr/lib/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.6/urllib2.py", line 1184, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.6/urllib2.py", line 1157, in do_open
    r = h.getresponse()
  File "/usr/lib/python2.6/httplib.py", line 990, in getresponse
    response.begin()
  File "/usr/lib/python2.6/httplib.py", line 391, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.6/httplib.py", line 349, in _read_status
    line = self.fp.readline()
  File "/usr/lib/python2.6/socket.py", line 427, in readline
    data = recv(1)
KeyboardInterrupt
    handler_func(args, cmd_opts)
  File "/usr/lib/pymodules/python2.6/univention/config_registry/frontend.py", line 162, in handler_set
    None if quiet else 'W: %s is overridden by scope "%s"')
  File "/usr/lib/pymodules/python2.6/univention/config_registry/frontend.py", line 203, in _run_changed
    handlers(changed.keys(), (ucr, changed))
  File "/usr/lib/pymodules/python2.6/univention/config_registry/handler.py", line 831, in __call__
    handler(arg)
  File "/usr/lib/pymodules/python2.6/univention/config_registry/handler.py", line 416, in __call__
    srcfiles=[self.from_file], opts=filter_opts))
  File "/usr/lib/pymodules/python2.6/univention/config_registry/handler.py", line 123, in run_filter
    ''' % template[start.end():end.start()])[0]
  File "/usr/lib/python2.6/subprocess.py", line 691, in communicate
    return self._communicate(input)
  File "/usr/lib/python2.6/subprocess.py", line 1211, in _communicate
    rlist, wlist, xlist = select.select(read_set, write_set, [])
KeyboardInterrupt
dpkg: Fehler beim Bearbeiten von ucs-school-singlemaster (--install):
 Unterprozess installiertes post-installation-Skript mit Signal (Unterbrechung) getötet
Comment 6 Stefan Gohmann univentionstaff 2019-01-03 07:24:01 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.