Univention Bugzilla – Bug 31801
Sync schema directory
Last modified: 2013-11-19 06:41:15 CET
We should synchronize the local schema directory to all backups:
A listener module should be implemented for this purpose,
* running on Master an Backup
* filtering for a specific objectClass representing UCS LDAP schema extensions
* writing the value of an LDAP attribute "univentionLDAPSchema"
* to a file specified by another LDAP attribute "univentionLDAPSchemaFilename"
* below the directory /var/lib/univention-ldap/local-schema.
* and commits the slapd.conf UCR template.
These UCS LDAP schema extension objects are created by metapackage joinscripts using a univention-lib function.
Additional tasks for the listener specific for the master:
* send a reload signal to the slapd (Bug #31801)
* signal schema availability (to the univention-lib function)
by writing the attribute "univentionLDAPSchemaActive" to the LDAP object.
The module has been implemented under the name settings_ldapschema.py
The schema data is expected to be gzip-compressed and base64 encoded.
The listener uses the "slapschema" tool to ensure schema validity during addition/removal of a schema extension. In case a univentionLDAPExtensionSchema object has been removed, but slapschema indicates that the extension is still required, the listener leaves the schema exentsion file in the local-schema directory and adds an informative comment line to it, indicating the fact of removal with a timestamp.
The listener module has now been renamed to "ldap_extension" and merged with the listener of Bug #32393.
Compression was changed to bzip2 due to limitations of the python zlib module.
(In reply to Arvid Requate from comment #2)
> The listener uses the "slapschema" tool to ensure schema validity during
> addition/removal of a schema extension. In case a
> univentionLDAPExtensionSchema object has been removed, but slapschema
> indicates that the extension is still required, the listener leaves the
> schema exentsion file in the local-schema directory and adds an informative
> comment line to it, indicating the fact of removal with a timestamp.
OK, I've added a simple test case for this:
The schema update fails, see
lg42x7ja7n (1.1) wird eingerichtet ...
Object exists: cn=ldapschema,cn=univention,dc=deadlock19,dc=local
E: Invalid Syntax: packageversion: Version must not be lower than the current one.
Wait until Arvid is back.
Ok, I fixed the debian/apt version comparison code.
See 10_ldap/70schema_registration_basis the schema file is not created on a dc backup. This is required for backup2master.
OK, the file is now available on the backup as well.
UCS 3.2 has been released:
If this error occurs again, please use "Clone This Bug".