Bug 49518 - update on repository server failed
update on repository server failed
Status: RESOLVED DUPLICATE of bug 49056
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-21 13:13 CEST by Christina Scheinig
Modified: 2019-05-28 10:49 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
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?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2019052121000207
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christina Scheinig univentionstaff 2019-05-21 13:13:14 CEST
A customer reported, that an update failed on his repository server, with the following traceback.

Starting dist-update at Tue May 21 08:10:33 2019...
Starting package upgrade                                Traceback in univention-upgrade:
Traceback (most recent call last):
  File "/usr/sbin/univention-upgrade", line 441, in do_update
    update_available = performUpdate(options, checkForUpdates=options.check, silent=False)
  File "/usr/sbin/univention-upgrade", line 139, in performUpdate
    if func(options, checkForUpdates, silent):
  File "/usr/sbin/univention-upgrade", line 221, in do_package_updates
    os.environ['ADMINDIARY_CONTEXT'] = context_id
  File "/usr/lib/python2.7/os.py", line 473, in __setitem__
    putenv(key, item)
TypeError: putenv() argument 2 must be string, not None

The used command was the following:
ucr set local/repository=no && univention-upgrade --noninteractive --ignoressh && ucr set local/repository=yes

Do you need more information?
Comment 1 Florian Best univentionstaff 2019-05-21 13:27:24 CEST
Already fixed in Bug #49056.

*** This bug has been marked as a duplicate of bug 49056 ***
Comment 2 Florian Best univentionstaff 2019-05-21 14:06:58 CEST
Workaround (untested):
sed -i "s#os.environ['ADMINDIARY_CONTEXT'] = context_id#os.environ['ADMINDIARY_CONTEXT'] = str(context_id)#g" /usr/sbin/univention-upgrade /usr/sbin/univention-updater
Comment 3 Christina Scheinig univentionstaff 2019-05-28 10:49:24 CEST
Workaround worked:

sed -i "s/os.environ\['ADMINDIARY_CONTEXT'\] = context_id/os.environ\['ADMINDIARY_CONTEXT'\] = str(context_id)/g" /usr/sbin/univention-upgrade