Bug 41862 - Set RecordUID/SourceUID for migrated users and new users created via wizards
Set RecordUID/SourceUID for migrated users and new users created via wizards
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 4.1 R2
Other Linux
: P5 major (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Daniel Tröder
Florian Best
: interim-1
Depends on: 41162
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-27 12:01 CEST by Daniel Tröder
Modified: 2016-10-04 13:24 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 5: Will affect all installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.571
Enterprise Customer affected?:
School Customer affected?: Yes
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 Daniel Tröder univentionstaff 2016-07-27 12:01:35 CEST
+++ This bug was initially created as a clone of Bug #41162 +++

ucsschoolSourceUID and ucsschoolRecordUID must contain correct values for all school users in LDAP, or the new legacy import will not find existing users and will try to add them.
Comment 1 Daniel Tröder univentionstaff 2016-07-27 12:05:57 CEST
Added code to /usr/share/ucs-school-import/scripts/ucs-school-migrate-objects-to-4.1R2.

Code: 71265
Advisory: 71266
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2016-08-09 12:10:16 CEST
The UMC wizards should also set the legacy attributes. Otherwise
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2016-08-09 12:10:57 CEST
The UMC wizards should also set the legacy attributes. Otherwise new users created via the Ucs@school wizard can not be maintained via CLI import script.
Comment 4 Daniel Tröder univentionstaff 2016-08-22 16:28:03 CEST
The legacy import part of the new import code now finds users with and without SourceUID and RecordUID in LDAP.
Modification of the UMC wizards is thus not necessary anymore.
The migration code from r71265 was removed

r71804: code
r71806: advisory
Comment 5 Daniel Tröder univentionstaff 2016-09-13 11:59:21 CEST
r72536: added 90_ucsschool/34_import-users_legacy_migration to test migration from pre-4.1r2 user-import to the new-legacy user-import.
Comment 6 Florian Best univentionstaff 2016-09-28 13:32:00 CEST
The code uses the abstract object class "ucsschoolType" for building the search filter. This abstract object class is required to be set on the object while we *currently* ensure this (the migrationscript sets this and the UDM handler by accident as well). So I think this is okay to use!
But why doesn't the test script fail if I remove the ucsschoolType from the list of object classes in the migration script (/usr/share/ucs-school-import/scripts/ucs-school-migrate-objects-to-4.1R2)?
I think in this case the test case should fail to recognize such errors.
Even better would be a test case which doesn't use that script at all but creates users via the UMC wizard as this is what we need to test in the future.
Comment 7 Daniel Tröder univentionstaff 2016-09-28 15:40:08 CEST
(In reply to Florian Best from comment #6)
> But why doesn't the test script fail if I remove the ucsschoolType from the
> list of object classes in the migration script
> (/usr/share/ucs-school-import/scripts/ucs-school-migrate-objects-to-4.1R2)?
At that point, the test wants to ensure, that the ucsschoolType OC is _not_ set yet.
1. run old-legacy import and checks if afterwards users have no ucsschoolType OC
2. run migration script and checks if afterwards users have the new OCs
3. run new-legacy import and checks if afterwards users have ucsschoolSourceUID and ucsschoolRecordUID

> I think in this case the test case should fail to recognize such errors.
> Even better would be a test case which doesn't use that script at all but
> creates users via the UMC wizard as this is what we need to test in the
> future.
The test tries to simulate the update scenario:
1. customer uses pre-4.1r2 (old-legacy) import
2. customer updates to 4.1r2
3. customer runs 4.1r2 new-legacy-import
Comment 8 Florian Best univentionstaff 2016-09-29 13:49:16 CEST
OK: Adding of already existing users doesn't overwrite them
OK: modification of users created via wizard works
# ldiff anton1_pre.ldif anton1_post.ldif
 dn: uid=anton1,cn=schueler,cn=users,ou=gsmitte,dc=school,dc=local
+ucsschoolSourceUID: LegacyDB
+ucsschoolRecordUID: Anton1
+sn: Meyer
-sn: Foobar
+gecos: Anton Meyer
-gecos: Anton Foobar
+displayName: Anton Meyer
-displayName: Anton Foobar
+cn: Anton Meyer
-cn: Anton Foobar

OK: YAML
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2016-10-04 13:24:53 CEST
UCS@school 4.1 R2 v5 has been released.

http://docs.software-univention.de/changelog-ucsschool-4.1R2v5-de.html

If this error occurs again, please clone this bug.