Univention Bugzilla – Bug 26785
Schema Update auf einem Slave/Backup
Last modified: 2014-03-20 16:24:19 CET
Aktuell müssen Schema Erweiterungen immer auf dem Master installiert werden. Es sollte die Möglichkeit geben, dass die Schema Erweiterungen auf einem Slave/Backup in den Join Skripten eingespielt werden.
Sobald eine Lösung für diesen Bug existiert, sollte nachgeprüft werden, - ob damit auch Bug #17341 gelöst ist, d.h. ein backup, der mit univention-backup2master auf master umgeschaltet wurde, sollte alle LDAP-Schema-Dateien haben, die auch der alte master hatte. - ob damit auch Bug #13588 gelöst ist, d.h. die Meldung "ldapError: Object class violation" darf beim Hochfahren des (umgeschalteten) neuen masters mit seinem slapd nicht mehr auftreten
We should check this for UCS 3.2. We have already a local directory for the schema integration. Maybe we could add a UMC service to upload such a schema file via network. The schema files should be synced to the backups automatically: Bug #31801.
A function ucs_registerLDAPSchema schould be implemented in univention-lib which * takes the name of an existing schema extension file as an argument * creates an UCS LDAP schema extension object * saves the given schema to the LDAP attribute "univentionLDAPSchema" * sets the LDAP attribute "univentionLDAPSchemaFilename" * sets some other attributes useful to track creator and versionnumber. * The creator and versionnumber may be determined automatically. * The cn schould reflect the basename of the schema file + versionnumber. After creating the UDM object the function waits for the attribute univentionLDAPSchemaActive to be set by the corresponding listener module on the UCS Master.
ucs_unregisterLDAPSchema is also required (e.g. for unjoinscripts), to remove the object in case no App is registered any longer for it.
The ucs_unregisterLDAPSchema function should probably abort with an error message in case LDAP objects defined by the schema may still be present in the UCS domain.
The ucs_unregisterLDAPSchema function should probably also abort in case the corresponding UDM module is still installed somewhere in the domain., so the recommended order might be ucs_unregisterUDMModule ucs_unregisterUDMHook ucs_unregisterUDMSyntax ucs_unregisterLDAPSchema ucs_unregisterLDAPACL
I got the following error while installing UCS 3.2 with UCS@school: ucs-school-import-schema (10.0.3-1.171.201307241108) wird eingerichtet ... Restarting ldap server(s). Stopping ldap server(s): slapd ...done. Check database: ...done. Starting ldap server(s): slapd ...done. Checking Schema ID: ...done. ERROR: Unable to determine Debian package name ERROR: This function only works in joinscript or postinst context dpkg: Fehler beim Bearbeiten von ucs-school-import-schema (--configure): Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
ucs_registerLDAPSchema expects to be called from a postinst or join script to automatically determine pacakgename and packageversion. For QA and ucs-test purposes the UCR variables tests/ucs_registerLDAP/packagename tests/ucs_registerLDAP/packageversion are checked in case the postinst and joinscript check fails.
Now merged into more general functions: ucs_registerLDAPExtension "$@" --schema <filename> ucs_unregisterLDAPExtension "$@" --schema <objectname>
The schema unregistration fails, see 10_ldap/70schema_unregistration_basis, I see the following error message: ERROR: Object not found in UDM.
Wait until Arvid is back.
Created attachment 5508 [details] For unregistration the object name needs to be given.
Tests fixed.
But I still see a traceback: Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/ldap_extension.py", line 95, in postrun handler_object.mark_active() File "/usr/lib/pymodules/python2.6/univention/lib/ldap_extension.py", line 313, in mark_active udm_object.modify() File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 338, in modify raise univention.admin.uexceptions.noObject univention.admin.uexceptions.noObject
Fixed by Bug 32392 Comment 12.
OK, it works now.
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".