Bug 25579 - failed.ldif beim Join eines UCS 2.4-4 Backup gegen einen UCS 3.0 Master
failed.ldif beim Join eines UCS 2.4-4 Backup gegen einen UCS 3.0 Master
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 2.4
Other Linux
: P1 normal (vote)
: UCS 3.2
Assigned To: Stefan Gohmann
Arvid Requate
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-21 17:56 CET by Arvid Requate
Modified: 2013-11-19 06:43 CET (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:


Attachments
failed.ldif (597.47 KB, text/plain)
2011-12-22 13:37 CET, Arvid Requate
Details
Protokoll der add-Listen, die in replication.py ldap add übergeben werden. (579.33 KB, text/plain)
2011-12-22 13:40 CET, Arvid Requate
Details
Patch für den failed.ldif Mode von replication.py (377 bytes, text/plain)
2011-12-22 17:09 CET, Arvid Requate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2011-12-21 17:56:16 CET
Das Joinen eines UCS 2.4-4 Backup gegen einen frisch installierten UCS 3.0 Master schlug in einer internen Testumgebung wiederholt mit einem failed.ldif fehl, das sich nicht mehr einspielen lässt, weil folgende Zeile im failed.ldif einen Syntax-Fehler auslöst:

dn: dc=univention,dc=info
changetype: add
[...diverse attribute...]
creatorsName: entryUUID: 628eb8f2-bffa-1030-8f37-bd66557c01b4

Das Attribut creatorsName ist auf dem Master am Objekt gesetzt aber leer.
Comment 1 Arvid Requate univentionstaff 2011-12-21 17:56:26 CET
Sieht nach einer Variante von Bug 15517 aus.
Comment 2 Arvid Requate univentionstaff 2011-12-22 13:37:07 CET
Created attachment 4037 [details]
failed.ldif

Der slapd meldet nit ldap/debug/level="stats config" bei univention-join:

Dec 21 22:50:42 backup24hw slapd[3140]: slapd starting 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 fd=15 ACCEPT from IP=10.200.16.223:49750 (IP=0.0.0.0:389) 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=0 BIND dn="cn=update,dc=univention,dc=info" method=128 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=0 BIND dn="cn=update,dc=univention,dc=info" mech=SIMPLE ssf=0 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=0 RESULT tag=97 err=0 text= 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=1 ADD dn="dc=univention,dc=info" 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=1 RESULT tag=105 err=21 text=creatorsName: value #0 invalid per syntax 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=2 ADD dn="cn=dns,dc=univention,dc=info" 
Dec 21 22:50:42 backup24hw slapd[3140]: conn=1000 op=2 RESULT tag=105 err=21 text=modifiersName: value #0 invalid per syntax
Comment 3 Arvid Requate univentionstaff 2011-12-22 13:40:37 CET
Created attachment 4038 [details]
Protokoll der add-Listen, die in replication.py ldap add übergeben werden.
Comment 4 Arvid Requate univentionstaff 2011-12-22 17:09:38 CET
Created attachment 4040 [details]
Patch für den failed.ldif Mode von replication.py 

Mit diesem Patch wird auch bei leeren Attribut-Werten ein korrektes failed.ldif geschrieben. Das ursprüngliche Join-Problem addressiert dieser Patch allerdings nicht, da im listener.log steht, dass ein beim Join aufgetretenes failed.ldif eingespielt wurde:

Restored modifies sucessfuly, the ldif-file will be moved to /tmp/replayed.ldif_2011-12-22-02:41:27

Das System war danach in einem unbrauchbaren Zustand und die Replikation ist weiter gestört (weitere failed.ldif), der listener konnte nicht zum UCS 3.0-0 Master connecten etc. Der Patch könnte dennoch nützlich sein..
Comment 5 Philipp Hahn univentionstaff 2012-10-17 19:20:43 CEST
Das ist auch bei einem UCS-3.1 Slave aufgetreten: Ursprung war unser UCS-3.0-2 Generic-Temmplate, das zunächst ungejoint auf 3.1 aktualisiert wurde, bevor der Versuch des Joinens gestartet wurde.

univention-join bricht ab und hinterlässt ein /var/liv/univention-directory-replication/failed.ldif. Dieses enthält ein leeres "creatorsName:"-Attribut, weshalb es mit dem nachfolgenden "dn:"-Attribut zusammenwächst (dazwischen fehlt die Leerzeile).
Comment 6 Jan Christoph Ebersbach univentionstaff 2012-10-19 10:30:08 CEST
Der Fehler ist ebenfalls bei Partner 9936 aufgefallen. Das Problem konnte auf die Initialisierung des LDAP zurückgeführt werden. Beim ersten Joinversuch war folgender Fehler im join.log zu finden.

WARNING!
Runnig as root!
There's a fair chance slapd will fail to start.
Check file permissions!

could not stat config file "/var/lib/univention-ldap/schema.conf": No such file or directory (2)
slapindex: bad configuration file!
Configure 01univention-ldap-server-init.inst 
File: /var/lib/univention-ldap/ldap/DB_CONFIG
/etc/ldap/slapd.conf: line 37: <suffix> invalid DN 21 (Invalid syntax)
slapadd: bad configuration file!
close failed: [Errno 32] Broken pipe

Bei den späteren Joinversuchen sah der Fehler dann wie folgt aus:

WARNING!
Runnig as root!
There's a fair chance slapd will fail to start.
Check file permissions!

/etc/ldap/slapd.conf: line 121: unknown attr "univentionKolabForwardActive" in to clause
<access clause> ::= access to <what> [ by <who> [ <access> ] [ <control> ] ]+ 
<what> ::= * | dn[.<dnstyle>=<DN>] [filter=<filter>] [attrs=<attrspec>]
<attrspec> ::= <attrname> [val[/<matchingRule>][.<attrstyle>]=<value>] | <attrlist>
<attrlist> ::= <attr> [ , <attrlist> ]
<attr> ::= <attrname> | @<objectClass> | !<objectClass> | entry | children
<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]
	[ realanonymous | realusers | realself | realdn[.<dnstyle>]=<DN> ]
	[dnattr=<attrname>]
	[realdnattr=<attrname>]
	[group[/<objectclass>[/<attrname>]][.<style>]=<group>]
	[peername[.<peernamestyle>]=<peer>] [sockname[.<style>]=<name>]
	[domain[.<domainstyle>]=<domain>] [sockurl[.<style>]=<url>]
	[dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]]
	[ssf=<n>] [transport_ssf=<n>] [tls_ssf=<n>] [sasl_ssf=<n>]
<style> ::= exact | regex | base(Object)
<dnstyle> ::= base(Object) | one(level) | sub(tree) | children | exact | regex
<attrstyle> ::= exact | regex | base(Object) | one(level) | sub(tree) | children
<peernamestyle> ::= exact | regex | ip | ipv6 | path
<domainstyle> ::= exact | regex | base(Object) | sub(tree)
<access> ::= [[real]self]{<level>|<priv>}
<level> ::= none|disclose|auth|compare|search|read|{write|add|delete}|manage
<priv> ::= {=|+|-}{0|d|x|c|s|r|{w|a|z}|m}+
<control> ::= [ stop | continue | break ]
dynacl:
	<name>=ACI	<pattern>=<attrname>

slapindex: bad configuration file!
Configure 01univention-ldap-server-init.inst 
File: /var/lib/univention-ldap/ldap/DB_CONFIG
/etc/ldap/slapd.conf: line 121: unknown attr "univentionKolabForwardActive" in to clause
<access clause> ::= access to <what> [ by <who> [ <access> ] [ <control> ] ]+ 
<what> ::= * | dn[.<dnstyle>=<DN>] [filter=<filter>] [attrs=<attrspec>]
<attrspec> ::= <attrname> [val[/<matchingRule>][.<attrstyle>]=<value>] | <attrlist>
<attrlist> ::= <attr> [ , <attrlist> ]
<attr> ::= <attrname> | @<objectClass> | !<objectClass> | entry | children
<who> ::= [ * | anonymous | users | self | dn[.<dnstyle>]=<DN> ]
	[ realanonymous | realusers | realself | realdn[.<dnstyle>]=<DN> ]
	[dnattr=<attrname>]
	[realdnattr=<attrname>]
	[group[/<objectclass>[/<attrname>]][.<style>]=<group>]
	[peername[.<peernamestyle>]=<peer>] [sockname[.<style>]=<name>]
	[domain[.<domainstyle>]=<domain>] [sockurl[.<style>]=<url>]
	[dynacl/<name>[/<options>][.<dynstyle>][=<pattern>]]
	[ssf=<n>] [transport_ssf=<n>] [tls_ssf=<n>] [sasl_ssf=<n>]
<style> ::= exact | regex | base(Object)
<dnstyle> ::= base(Object) | one(level) | sub(tree) | children | exact | regex
<attrstyle> ::= exact | regex | base(Object) | one(level) | sub(tree) | children
<peernamestyle> ::= exact | regex | ip | ipv6 | path
<domainstyle> ::= exact | regex | base(Object) | sub(tree)
<access> ::= [[real]self]{<level>|<priv>}
<level> ::= none|disclose|auth|compare|search|read|{write|add|delete}|manage
<priv> ::= {=|+|-}{0|d|x|c|s|r|{w|a|z}|m}+
<control> ::= [ stop | continue | break ]
dynacl:
	<name>=ACI	<pattern>=<attrname>

slapadd: bad configuration file!
close failed: [Errno 32] Broken pipe
Not updating windows/domain
Not updating kerberos/realm
Check database: od: /var/lib/univention-ldap/ldap/log.*: Datei oder Verzeichnis nicht gefunden
 * /var/lib/univention-ldap/ldap BDB Version does not seem to match the one back-bdb uses
 * Skipping /usr/bin/db4.7_recover to avoid damage
done
   * Starting ldap server(s): slapd


Der zweite Fehler konnte durch Auskommentieren der Kolab-Legacy-ACLs in der slapd.conf, bzw. im zugehörigen Template, behoben werden. Anschließend war der vollständige Join möglich.
Comment 7 Janis Meybohm univentionstaff 2013-05-31 10:06:03 CEST
Erneut berichtet: <http://forum.univention.de/viewtopic.php?f=48&t=2664&p=9090>

Dort ist creatorsName auf dem DC-Master anscheinend leer, evtl. kann man das irgendwie provozieren (manuelles slapadd auf dem Master o.ä.?).
Comment 8 Stefan Gohmann univentionstaff 2013-07-10 10:08:50 CEST
(In reply to Jan Christoph Ebersbach from comment #6)
> Der Fehler ist ebenfalls bei Partner 9936 aufgefallen. Das Problem konnte
> auf die Initialisierung des LDAP zurückgeführt werden. Beim ersten
> Joinversuch war folgender Fehler im join.log zu finden.
> 
> WARNING!
> Runnig as root!
> There's a fair chance slapd will fail to start.
> Check file permissions!
> 
> could not stat config file "/var/lib/univention-ldap/schema.conf": No such
> file or directory (2)
> slapindex: bad configuration file!
> Configure 01univention-ldap-server-init.inst 
> File: /var/lib/univention-ldap/ldap/DB_CONFIG
> /etc/ldap/slapd.conf: line 37: <suffix> invalid DN 21 (Invalid syntax)
> slapadd: bad configuration file!
> close failed: [Errno 32] Broken pipe

Das hat mit diesem Problem nichts zu tun und ist auch "nur" ein Schönheitsfehler. 

(In reply to Janis Meybohm from comment #7)
> Erneut berichtet:
> <http://forum.univention.de/viewtopic.php?f=48&t=2664&p=9090>
> 
> Dort ist creatorsName auf dem DC-Master anscheinend leer, evtl. kann man das
> irgendwie provozieren (manuelles slapadd auf dem Master o.ä.?).

Ja, auch in meiner 3.1 Testumgebung ist creatorsName auf dem Master leer:

root@master501:~# univention-ldapsearch -s base + | sed -ne 's|^creat|creat|p'
creatorsName:
createTimestamp: 20130116063040Z
root@master501:~# 

Deshalba glaube ich, dass der Patch von Arvid für das failed.ldif im ersten Schritt reicht.
Comment 9 Stefan Gohmann univentionstaff 2013-07-10 10:21:04 CEST
Patch wurde übernommen.

Code: r42231
Changelog: r42232
Comment 10 Arvid Requate univentionstaff 2013-08-19 16:41:07 CEST
Verified: univention-directory-replication has been built with the patch, the listener module still works.
Changelog: Ok.
Comment 11 Stefan Gohmann univentionstaff 2013-11-19 06:43:51 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".