Bug 31407 - Allow UMC modules and scripts to work in district mode
Allow UMC modules and scripts to work in district mode
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 3.1
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2
Assigned To: Florian Best
Dirk Wiesenthal
:
: 28244 31063 31070 32031 (view as bug list)
Depends on: 30251 32031
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 17:29 CEST by Sönke Schwardt-Krummrich
Modified: 2014-06-12 09:20 CEST (History)
3 users (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:
klaeser: Patch_Available+


Attachments
current patch (13.19 KB, patch)
2014-04-22 11:22 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-05-21 17:29:29 CEST
Bug 30251 contains a patch that enables the UMC modules to work with active district mode.
Please note: the patch is currently incomplete. There are some known flaw documented at Bug 30251 (and maybe there are still some more unknown flaws). 

All UMC modules have to be tested intensively after applying the patch, as it affects the OU lookup that is used in all UMC modules of UCS@school.

The patch does not cover CLI tools and Joinscripts. These still have to be fixed too.
Comment 1 Alexander Kläser univentionstaff 2013-05-31 13:33:33 CEST
*** Bug 28244 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Kläser univentionstaff 2013-05-31 13:36:31 CEST
*** Bug 31070 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Kläser univentionstaff 2013-05-31 13:36:54 CEST
*** Bug 31063 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Kläser univentionstaff 2013-11-28 09:46:29 CET
*** Bug 32031 has been marked as a duplicate of this bug. ***
Comment 5 Florian Best univentionstaff 2014-04-22 11:22:03 CEST
Created attachment 5881 [details]
current patch
Comment 6 Florian Best univentionstaff 2014-05-07 14:42:42 CEST
The following packages have been adapted:
ucs-school-umc-computerroom 5.0.3-1.140.201405061120
ucs-school-lib 5.0.16-2.115.201405061229
ucs-school-netlogon-user-logonscripts 10.0.2-1.44.201405061128
ucs-school-s4-branch-site 1.0.1-1.3.201405061132
ucs-school-umc-distribution 11.0.3-1.65.201405061136
ucs-school-umc-groups 2.0.3-1.49.201405061141

Changelog entry has been created.
Comment 7 Dirk Wiesenthal univentionstaff 2014-05-16 01:44:24 CEST
/usr/share/ucs-school-import/scripts/ucs-school-change-share-server

seems to not handle district mode properly

Everything else seems fine
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2014-05-16 09:39:40 CEST
(In reply to Dirk Wiesenthal from comment #7)
> /usr/share/ucs-school-import/scripts/ucs-school-change-share-server
> 
> seems to not handle district mode properly

fixed

ucs-school-import (10.0.15-1) unstable; urgency=low
Comment 9 Dirk Wiesenthal univentionstaff 2014-05-16 10:19:27 CEST
Ok
Comment 10 Dirk Wiesenthal univentionstaff 2014-05-16 13:14:12 CEST
Sorry, REOPENED:

Some scripts which parse the dn with sed work with the districtname as ouname:

ucs-school-lib/shell/base.sh
  school_ou cn=myslave,cn=dc,cn=server,cn=computers,ou=foo,ou=bar,dc=example,dc=com
  -> bar instead of foo!

ucs-school-import/ucs-school-join-secondary-samba4
  implements a copy of ucs-school-lib/shell/base.sh->school_ou! Same bug

ucs-school-metapackage/00ucs-school-slave-check-ou.inst
 -> sed -nre "s/^.+,ou=([^,]+)(,ou=[^,]+)?,$ldap_base\$/\1/p" is wrong
 -> Joinscript fails!
Comment 11 Sönke Schwardt-Krummrich univentionstaff 2014-05-16 17:19:52 CEST
(In reply to Dirk Wiesenthal from comment #10)
> Sorry, REOPENED:
> 
> Some scripts which parse the dn with sed work with the districtname as
> ouname:
> 
> ucs-school-lib/shell/base.sh
>   school_ou
> cn=myslave,cn=dc,cn=server,cn=computers,ou=foo,ou=bar,dc=example,dc=com
>   -> bar instead of foo!

Fixed. 
 
> ucs-school-import/ucs-school-join-secondary-samba4
>   implements a copy of ucs-school-lib/shell/base.sh->school_ou! Same bug

Removed broken code. The script now includes ucs-school-lib/base.sh and uses school_ou()

> ucs-school-metapackage/00ucs-school-slave-check-ou.inst
>  -> sed -nre "s/^.+,ou=([^,]+)(,ou=[^,]+)?,$ldap_base\$/\1/p" is wrong
>  -> Joinscript fails!

Removed broken code. The script now includes ucs-school-lib/base.sh and uses school_ou()
Comment 12 Dirk Wiesenthal univentionstaff 2014-05-19 11:03:51 CEST
Ok
Comment 13 Dirk Wiesenthal univentionstaff 2014-05-19 11:59:34 CEST
UMC modules do not work properly on DC slaves when district mode is enabled on the Master.

The district-OU gets added to the school's DN when the UCR variable is set. This means that this very UCR variable has to be set everywhere. If only set on the DC master, schools are created correctly and modules work correctly on the master.

But if the UCR variable is not set on DC slaves, those will (locally) build false DNs and thus show tracebacks as in https://forge.univention.org/bugzilla/show_bug.cgi?id=34337#c4

I do not know if this is to be fixed in the code or if this is a misconfiguration.
Comment 14 Sönke Schwardt-Krummrich univentionstaff 2014-05-19 15:31:29 CEST
(In reply to Dirk Wiesenthal from comment #13)
> I do not know if this is to be fixed in the code or if this is a
> misconfiguration.

Very simple answer: this is a misconfiguration.
The district mode setting has to be the same throughout the whole domain: enabled on all systems or disabled on all systems. Other scenarios are not supported.
Comment 15 Sönke Schwardt-Krummrich univentionstaff 2014-06-12 09:19:29 CEST
UCS@school 3.2 R2 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2-de.html

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