Bug 26785 - Schema Update auf einem Slave/Backup
Schema Update auf einem Slave/Backup
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 3.0
Other Linux
: P5 enhancement (vote)
: UCS 3.2
Assigned To: Arvid Requate
Stefan Gohmann
: interim-3
Depends on: 32391 32412
Blocks: 32414 32421
  Show dependency treegraph
 
Reported: 2012-04-13 16:04 CEST by Stefan Gohmann
Modified: 2014-03-20 16:24 CET (History)
1 user (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): Further conceptual development, Release Goal
Max CVSS v3 score:


Attachments
For unregistration the object name needs to be given. (953 bytes, patch)
2013-10-08 14:17 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2012-04-13 16:04:36 CEST
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.
Comment 1 Jürgen Kahrs univentionstaff 2012-05-31 09:01:03 CEST
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
Comment 2 Stefan Gohmann univentionstaff 2013-06-25 06:44:54 CEST
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.
Comment 3 Arvid Requate univentionstaff 2013-08-27 20:41:25 CEST
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.
Comment 4 Arvid Requate univentionstaff 2013-08-28 16:41:51 CEST
ucs_unregisterLDAPSchema is also required (e.g. for unjoinscripts), to remove the object in case no App is registered any longer for it.
Comment 5 Arvid Requate univentionstaff 2013-08-28 16:51:53 CEST
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.
Comment 6 Arvid Requate univentionstaff 2013-08-28 17:16:01 CEST
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
Comment 7 Stefan Gohmann univentionstaff 2013-08-30 07:41:45 CEST
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
Comment 8 Arvid Requate univentionstaff 2013-09-04 16:51:10 CEST
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.
Comment 9 Arvid Requate univentionstaff 2013-09-16 18:02:56 CEST
Now merged into more general functions:

ucs_registerLDAPExtension "$@" --schema <filename>

ucs_unregisterLDAPExtension "$@" --schema <objectname>
Comment 10 Stefan Gohmann univentionstaff 2013-09-23 10:54:27 CEST
The schema unregistration fails, see 10_ldap/70schema_unregistration_basis, I see the following error message:
 ERROR: Object not found in UDM.
Comment 11 Stefan Gohmann univentionstaff 2013-09-23 14:01:38 CEST
Wait until Arvid is back.
Comment 12 Arvid Requate univentionstaff 2013-10-08 14:17:22 CEST
Created attachment 5508 [details]
For unregistration the object name needs to be given.
Comment 13 Arvid Requate univentionstaff 2013-10-08 15:23:39 CEST
Tests fixed.
Comment 14 Stefan Gohmann univentionstaff 2013-10-25 16:30:38 CEST
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
Comment 15 Arvid Requate univentionstaff 2013-10-28 20:13:33 CET
Fixed by Bug 32392 Comment 12.
Comment 16 Stefan Gohmann univentionstaff 2013-10-30 08:38:47 CET
OK, it works now.
Comment 17 Stefan Gohmann univentionstaff 2013-11-19 06:42:25 CET
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".