Univention Bugzilla – Bug 55082
optparse.OptionConflictError: option -A/--authentication-file: conflicting option string(s): -A, --authentication-file
Last modified: 2022-09-08 11:43:57 CEST
Several jenkins jobs for UCS 5.0-2 log the following traceback: 2 times in /var/log/univention/join.log: https://jenkins2022.knut.univention.de/job/UCSschool-5.0/job/Install%20Multiserver/Config=s4,TestGroup=base1,UCSRelease=testing/ws/test/join.log Traceback (most recent call last): » File "/usr/share/univention-samba4/scripts/univention-samba4-site-tool.py", line 78, in <module> » parser.add_option("-A", "--authentication-file", dest="authentication_file", help="Get the credentials from a file") » File "/usr/lib/python3.7/optparse.py", line 1008, in add_option » self._check_conflict(option) » File "/usr/lib/python3.7/optparse.py", line 983, in _check_conflict » option) optparse.OptionConflictError: option -A/--authentication-file: conflicting option string(s): -A, --authentication-file called from joinscript services/univention-samba4/96univention-samba4.inst. +++ This bug was initially created as a clone of Bug #53100 +++
This is already added by /usr/lib/python3/dist-packages/samba/getopt.py Comment the line with "-A" out, and run it: ----------------------------------------------------------------- root@master203:~# /usr/share/univention-samba4/scripts/univention-samba4-site-tool.py --help [..] Credentials Options: [..] -A AUTHFILE, --authentication-file=AUTHFILE Authentication file ----------------------------------------------------------------- So adding it to univention-samba4-site-tool.py is not necessary. The samba/getopt.py seems to be custom patched or similar, as this options code does not exist anywhere in Sambas repository. AFAICS the option can be removed and lines 110-113 are not necessary, and "-A" can still be used.
The script fails in all of UCS@school Jenkins jobs.
[5.0-2 9bfcebb3bb] Bug #55082: Ignore traceback from optparse.OptionConflictError
MR: https://git.knut.univention.de/univention/ucs/-/merge_requests/488
9bfcebb3bb | Ignore traceback from optparse.OptionConflictError 3a89020640 | - optparse.OptionConflictError option -A/--authentication-file: conflicting option string(s): -A, --authentication-file 0d62c3f1b7 | Advisory update
Verified: * Code review * Functional test password=univention root@primary20:~# /usr/share/univention-samba4/scripts/univention-samba4-site-tool.py -H "ldap://$(hostname -f)" \ -A auth-file.txt --site foo1 --createsite --ignore-exists created site foo1 * Test not strictly required * Documentation update not required * No risk expected for other (non-updated) systems * Advisory
<https://errata.software-univention.de/#/?erratum=5.0x402>