Bug 39581 - UnboundLocalError: local variable 'username' referenced before assignment
UnboundLocalError: local variable 'username' referenced before assignment
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1
Assigned To: Dirk Wiesenthal
Stefan Gohmann
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-19 08:01 CEST by Stefan Gohmann
Modified: 2015-11-17 12:11 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
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?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
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 Stefan Gohmann univentionstaff 2015-10-19 08:01:33 CEST
I saw the following traceback in ucs-test on a S3 DC Backup. 

http://jenkins.knut.univention.de:8080/job/UCS-4.1/job/UCS-4.1-0/job/Autotest%20MultiEnv/SambaVersion=s3,Systemrolle=backup/66/testReport/80_docker/55_app_modproxy/test/

Status: Image is up to date for docker.software-univention.de/ucs-appbox-amd64:4.1-0
Initializing app image
Preconfiguring container fd8f93a6ec7138dba1057a289c4589d584a989045eed267bebd2b6e615eeb816
Error response from daemon: Cannot restart container fd8f93a6ec7138dba1057a289c4589d584a989045eed267bebd2b6e615eeb816: Bind for 0.0.0.0:40001 failed: port is already allocated
time="2015-10-18T21:15:18-04:00" level=fatal msg="Error: failed to restart one or more containers" 
Starting sr3akmzo3a Container fd8f93a6ec7138dba1057a289c4589d584a989045eed267bebd2b6e615eeb816 ...
Unable to start the container!
Aborting...
Going to remove sr3akmzo3a (5.3.9)
Invalid credentials
File: /usr/share/univention-management-console/modules/apps.xml

File: /usr/share/univention-management-console/i18n/de/apps.mo

File: /etc/apt/apt.conf.d/55user_agent

Downloading "https://backup092.autotest092.local/meta-inf/categories.ini"...
Downloading "https://backup092.autotest092.local/meta-inf/4.1/index.json.gz"...
0 file(s) are new
sr3akmzo3a=5.3.9: Not running, cannot check further
local variable 'username' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/__init__.py", line 182, in call_with_namespace
    result = self.main(namespace)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/remove.py", line 46, in main
    self.do_it(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/install_base.py", line 106, in do_it
    self._do_it(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/docker_remove.py", line 47, in _do_it
    self._unregister_host(app, args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/register.py", line 245, in _unregister_host
    lo, pos = self._get_ldap_connection(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/credentials.py", line 165, in _get_ldap_connection
    userdn = self._get_userdn(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/credentials.py", line 108, in _get_userdn
    username = self._get_username(args)
  File "/usr/lib/pymodules/python2.7/univention/appcenter/actions/credentials.py", line 74, in _get_username
    return username
UnboundLocalError: local variable 'username' referenced before assignment
Comment 1 Dirk Wiesenthal univentionstaff 2015-10-19 11:08:12 CEST
Fixed in
  univention-management-console-module-appcenter 5.0.6-30.477.201510191057
Comment 3 Stefan Gohmann univentionstaff 2015-11-17 12:11:58 CET
UCS 4.1 has been released:
 https://docs.software-univention.de/release-notes-4.1-0-en.html
 https://docs.software-univention.de/release-notes-4.1-0-de.html

If this error occurs again, please use "Clone This Bug".