Univention Bugzilla – Bug 34970
Working groups with alien students have issues
Last modified: 2015-12-02 10:34:43 CET
Multi Server setup: If you manage working groups on the master, you can choose to add OU1's students to OU2's working group. This _may_ be useful, e.g. when schools work together to form a "Leistungskurs". Anyway, opening this working group on the slave yields Die Ausführung des Kommandos schoolgroups/get ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute func( request ) File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func return func( *args, **kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolgroups/__init__.py", line 173, in get user.open() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 1424, in open self['primaryGroup']=None File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 215, in __setitem__ raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description valueRequired: Die Eigenschaft Primäre Gruppe wird benötigt.
That traceback and the following were reported via traceback feedback: It prevents searching for users. Traceback: Die Ausführung des Kommandos schoolusers/query ist fehlgeschlagen: Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 218, in execute func( request ) File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 204, in wrapper_func return func( *args, **kwargs ) File "/usr/lib/pymodules/python2.6/univention/management/console/modules/schoolusers/__init__.py", line 77, in query result = self._users( ldap_user_read, search_base, group = klass, user_type = request.flavor, pattern = request.options.get( 'pattern', '' ) ) File "/usr/lib/pymodules/python2.6/ucsschool/lib/schoolldap.py", line 637, in _users userObj.open() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 1456, in open self['primaryGroup']=None File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 234, in __setitem__ raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description valueRequired: Die Eigenschaft Primäre Gruppe wird benötigt.
Aus users/user.py primaryGroupNumber=self.oldattr.get('gidNumber',[''])[0] if primaryGroupNumber: # hier will man rein else: # erzeugt wohl immer einen Traceback? Wenn ja, dann keine Ahnung, wozu der Pfad gut sein soll => Vielleicht PrimaryGroup gelöscht?
Maybe user without posix option? See Bug #37119
FYI, I saw the same tracebacks in the USI tarball at Ticket #2014110221000053. The information there may help to better understand the problem.
(In reply to Florian Best from comment #1) > ... > valueRequired: Die Eigenschaft Primäre Gruppe wird benötigt. Running the following script on a DC master... -------------------- 8< -------------------- import univention.admin.modules as udm_modules import univention.admin.uldap as udm_uldap import univention.admin.objects as udm_obj import univention.config_registry as ucr udm_modules.update() c = ucr.ConfigRegistry() c.load() lo, po = udm_uldap.getAdminConnection() module = udm_modules.get('users/user') udm_modules.init(lo, po, module) dn = 'uid=doesnotexist,cn=users,%s' % c['ldap/base'] o = udm_obj.get(module, None, lo, po, dn) o.open() print o.info -------------------- 8< -------------------- ... leads to the following error traceback: -------------------- 8< -------------------- Traceback (most recent call last): File "udm.py", line 13, in <module> o.open() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/users/user.py", line 1456, in open self['primaryGroup']=None File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 234, in __setitem__ raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description univention.admin.uexceptions.valueRequired: The property Primary group is required -------------------- 8< --------------------
(In reply to Alexander Kläser from comment #4) > FYI, I saw the same tracebacks in the USI tarball at Ticket > #2014110221000053. The information there may help to better understand the > problem. Found in var_log_univention_management-console-module-schoolexam.log_1: -------------------- 8< -------------------- 01.12.14 08:06:47.179 DEBUG_INIT 01.12.14 08:08:08.533 MODULE ( WARN ) : Could not open user object uid=exam-[...] ... ignoring: Die Eigenschaft Primäre Gruppe wird benötigt. 01.12.14 08:08:08.538 MODULE ( WARN ) : Could not open user object uid=exam-[...] ... ignoring: Die Eigenschaft Primäre Gruppe wird benötigt. [...] 01.12.14 08:08:08.610 MODULE ( PROCESS ) : Vorbereitung der Klassenarbeitskonten - [...] 01.12.14 08:08:09.507 MODULE ( PROCESS ) : Vorbereitung der Klassenarbeitskonten - [...] [...] 01.12.14 08:08:19.574 MODULE ( PROCESS ) : Einrichten der Heimatverzeichnisse - [...] 01.12.14 08:08:19.609 MODULE ( PROCESS ) : Einrichten der Heimatverzeichnisse - [...] [...] 01.12.14 08:08:22.851 MODULE ( PROCESS ) : Verteilung der Klassenarbeitsdateien - 01.12.14 08:08:36.413 MODULE ( PROCESS ) : Vorbereiten der Raumeinstellungen - beendet... -------------------- 8< --------------------
Reported again, 3.2-4 errata241 (Borgfeld)
Fixed in svn r57582. Catching udm_exceptions.base when opening a user object, ignoring it when it fails (write the exception to logfile).
merged to UCS@school 3.2
Adapted in svn r58129 to only catch noObject exception and lower log level then.
The traceback still occurs since univention.admin.uexceptions.valueRequired is raised and not catched. Attached a possible patch.
Created attachment 6695 [details] Catch noObject exception
OK: XML changelog entry
You're right, fixed, package builds.
OK: no traceback when opening groups with alien students OK: debian changelog entry OK: XML changelog entry OK: package is built OK: code change OK: no manual change required ucs-school-umc-groups (3.0.1-4) unstable; urgency=medium ucs-school-lib (6.0.1-7) unstable; urgency=medium The following message is created in ucs-school-umc-distribution/umc/python/distribution/util.py, is non-critical and not fixed by this bug: 01.12.14 08:08:08.538 MODULE ( WARN ) : Could not open user object uid=exam-[...] ... ignoring: Die Eigenschaft Primäre Gruppe wird benötigt.
UCS@school 4.0 v2 has been released: http://docs.univention.de/release-notes-ucsschool-4.0v2-de.html If this error occurs again, please use "Clone This Bug".
Reported again, 3.2-6 errata363 (Borgfeld) Remark: Versuch, als Administrator eine Projektgruppe eines ausgeschiedenen Lehrers einer anderen Kollegin zuzuordnen. Schade ...
*** Bug 18784 has been marked as a duplicate of this bug. ***
Reported again, 3.2-6 errata372 (Borgfeld)
Reported again, 3.2-7 errata382 (Borgfeld) Remark: Passwörter für Klasse 3a können nicht zurückgesetzt werden
(In reply to Florian Best from comment #20) > Reported again, 3.2-7 errata382 (Borgfeld) > > Remark: > Passwörter für Klasse 3a können nicht zurückgesetzt werden Any information which UCS@school version is used? 3.2 R2 v???