Bug 45967 - Einrichten der Active-Directory-Verbindung: UnboundLocalError: local variable 'cmd' referenced before assignment
Einrichten der Active-Directory-Verbindung: UnboundLocalError: local variable...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-0-errata
Assigned To: Erik Damrose
Felix Botner
:
: 46962 (view as bug list)
Depends on:
Blocks: 46962
  Show dependency treegraph
 
Reported: 2017-12-29 17:26 CET by Florian Best
Modified: 2018-07-17 15:31 CEST (History)
3 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: 2018052521000078, 2018032021000911, 2018032321000334, 2018022321000541, 2018031521000948, 2018021521000799, 2018013121000573, 2018012221000312, 2017122921000451
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-12-29 17:26:40 CET
Version: 4.2-3 errata256 (Lesum)

Einrichten der Active-Directory-Verbindung: Traceback (most recent call last):
Einrichten der Active-Directory-Verbindung: File "%PY2.7%/univention/management/console/modules/setup/setup_script.py", line 310, in run
Einrichten der Active-Directory-Verbindung: success = self.inner_run()
Einrichten der Active-Directory-Verbindung: File "/usr/lib/univention-system-setup/scripts/90_postjoin/10admember", line 122, in inner_run
Einrichten der Active-Directory-Verbindung: admember.add_domaincontroller_srv_record_in_ad(ad_server_ip, username, password)
Einrichten der Active-Directory-Verbindung: File "%PY2.7%/univention/lib/admember.py", line 1357, in add_domaincontroller_srv_record_in_ad
Einrichten der Active-Directory-Verbindung: ud.debug(ud.MODULE, ud.ERROR, "%s failed with %d (%s)" % (cmd, p1.returncode, stderr))
Einrichten der Active-Directory-Verbindung: UnboundLocalError: local variable 'cmd' referenced before assignment

Role: domaincontroller_master
Comment 1 Florian Best univentionstaff 2017-12-29 17:31:06 CET
Caused by Bug #43745.
Patch available in branch fbest/45967-fix-typo-admember.
Comment 2 Johannes Keiser univentionstaff 2018-01-15 16:29:08 CET
Reported again: Version: 4.2-3 errata256 (Lesum)
Comment 3 Johannes Keiser univentionstaff 2018-02-15 17:46:01 CET
Reported again: Version: 4.2-3 errata265 (Lesum)
Comment 4 Johannes Keiser univentionstaff 2018-02-16 13:02:27 CET
Reported again: Version: 4.2-3 errata272 (Lesum)
Comment 5 Johannes Keiser univentionstaff 2018-02-16 13:34:21 CET
Reported again: Version: 4.2-3 errata305 (Lesum)
Comment 6 Johannes Keiser univentionstaff 2018-03-16 11:54:48 CET
Reported again: Version: 4.3-0 errata0 (Neustadt)
Comment 7 Johannes Keiser univentionstaff 2018-03-16 13:16:03 CET
Reported again: Version: 4.2-3 errata305 (Lesum)

Remark: Happens during setup. I have tested many times to execute AD takeover, result is successfull but later I cannot dcpromo a windows server or join windows 7 to domain, shows
error in srv records.
Comment 8 Erik Damrose univentionstaff 2018-03-16 14:05:00 CET
https://github.com/univention/univention-corporate-server/blob/4.3-0/base/univention-lib/python/admember.py#L1357

The traceback masks the real issue. The nsupdate call to remove the existing SRV record from the AD failed.
Comment 9 Erik Damrose univentionstaff 2018-03-16 16:04:17 CET
ec1e0140 Assign variable before referencing it
2bf83d31 yaml

univention-lib 7.0.0-3A~4.3.0.201803161600
Comment 10 Felix Botner univentionstaff 2018-03-19 13:37:01 CET
OK - univention-lib  (add_domaincontroller_srv_record_in_ad)
FAIL - version missing in yaml
Comment 11 Erik Damrose univentionstaff 2018-03-19 13:41:55 CET
9c46d4e0 fix yaml
Comment 12 Felix Botner univentionstaff 2018-03-19 13:47:04 CET
OK - YAML
Comment 13 Arvid Requate univentionstaff 2018-03-21 13:27:16 CET
<http://errata.software-univention.de/ucs/4.3/3.html>
Comment 14 Johannes Keiser univentionstaff 2018-03-29 18:01:16 CEST
Reported again: Version: 4.3-0 errata0 (Neustadt)
Comment 15 Johannes Keiser univentionstaff 2018-03-29 19:41:06 CEST
Reported again: Version: 4.3-0 errata0 (Neustadt)
Comment 16 Johannes Keiser univentionstaff 2018-05-25 17:50:31 CEST
Reported again: Version: 4.2-4 errata418 (Lesum)
Same as Comment #0
Comment 17 Erik Damrose univentionstaff 2018-05-28 09:47:33 CEST
Please add new reports to Bug #46962, this bug is closed.
Comment 18 Felix Botner univentionstaff 2018-07-17 15:31:58 CEST
*** Bug 46962 has been marked as a duplicate of this bug. ***