> Full_Name: Jochen Keutel
> Version: 2.4.21
> OS: Solaris 10
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (87.159.206.14)
>
>
> dnssrv_back_referrals() always returns ldap URLs - even when the original
> request was a ldaps query.
This is a (logical) duplicate of ITS#6462; see related answers.
> Additionally only protocol and hostname are put into the URL - the search
> base
> doesn't appear any more.
>
> Problematic code:
>
> url.bv_len = STRLENOF( "ldap://" ) + strlen( hosts[i] );
> url.bv_val = ch_malloc( url.bv_len + 1 );
>
> strcpy( url.bv_val, "ldap://" );
> strcpy( &url.bv_val[STRLENOF( "ldap://" )], hosts[i] );
>
> I'm not sure whether you want me to deliver a complete patch or not ...
This behavior conforms to RFC4511, section 4.1.10:
- If the <dn> part is present, the client uses this name in its next
request to progress the operation, and if it is not present the
client uses the same name as in the original request.
I note that few lines above the same RFC states:
- It is RECOMMENDED that the <dn> part be present to avoid ambiguity.
However, slapd-dnssrv(5) computes the referral from DNS SRV records,
rather than returning data it knows about. So returning the <dn> part
here would be incorrect, in my opinion, as the client could legitimately
rely on the fact that the returned DN is appropriate, while it may not.
p.
> --On Wednesday, January 27, 2010 1:28 AM +0000 jochen(a)keutel.de wrote:
>
>> Full_Name: Jochen Keutel
>> Version: 2.4.21
>> OS: Solaris 10
>> URL: ftp://ftp.openldap.org/incoming/
>
>> protocol is either "ldap" oder "ldaps".
>
> LDAPS is not a defined protocol. I would suggest using LDAP with
> startTLS,
> which is RFC Defined.
One could argue that OpenLDAP supports ldaps in many places. I agree in
general with your reply, but I'd treat this ITS as a feature request,
although I'm not going to give it any special priority.
p.
> Full_Name: Robert Hanson
> Version: 2.4.21
> OS: RedHat 4.7
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (74.203.208.250)
>
>
> 1) start with an empty database; use slapadd to add a large (3 MB)
> database. 2)
> Use ldapbrowser to delete nearly all the nodes. After this process, I get
> to a
> point where a subnode can't be deleted; I see the message "12:00:27 PM:
> Failed
> to delete entry ou=Agents, lcc=Call Center 1, ou=Company, o=Spanlink
> Communications
> Reason: [LDAP: error code 80 - DN index delete failed]
> 12:15:19 PM: Failed to delete entry ou=Agents, lcc=Call Center 1,
> ou=Company,
> o=Spanlink Communications
> Reason: [LDAP: error code 80 - DN index delete failed]" in the ldapbrowser
> window.
>
> Steps to reproduce: (on redhat linux; I think any linux will do)
> 1) build bdb 4.8.26 from the distro; build openldap 2.4.21 from the
> distro.
> 2) copy built slapd to an appropriate place. link it to slapadd.
> 3) FTP: ftp.calabrio.com, user openldap, pass *a68pcJH (Account is
> scheduled to
> close 3/23/2010; let me know if you need the file uploaded again). unzip
> the
> file, it contains the slapcat.out; a blank database (in a subfolder), and
> a
> slapd.conf file.
> 4) Edit the slapd.conf file as needed to point to the directory where you
> put
> the database.
>
> That was the setup, now here are the steps to reproduce the problem:
>
> 5) use slapadd -c -f slapd.conf -l slapcat.out to create the database.
> 6) start slapd (using slapd -d 1 -f slapd.conf)
> 7) use ldapbrowser to delete the "lcc=call center 1" node.
>
> It takes a long time, but eventually you'll see it fail while trying to
> delete
> the "agents" node.
Can you reproduce with -dtrace? It'll generate a large log file, please
only post the part related to the failure.
p.
masarati(a)aero.polimi.it wrote:
>
>> It's not clear to me where the issue is. What is the "right" sequence the
>> add of the new superior and the mordrdn should be transmitted? Should the
>> provider operate differently, or should the consumer check all syncrepl
>> messages and try to rebuild the final state, instead of giving up when the
>> internal lookup for the newsuperior fails? Probably, a workaround could
>> be to perform the modrdn by crating the new superior as a glue object,
>> which eventually will be replaced by the actual add.
>
> I've quickly hacked things this way, and it seems to work fine.
>
> <ftp://ftp.openldap.org/incoming/pierangelo-masarati-2010-04-17-sync-rename.…>
>
> Please let me know if this approach is sound enough, I might have
> overlooked some implications.
Patch looks good, solution makes sense. This is one of the reasons we would
expect glue entries to be used.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kurt Zeilenga wrote:
> On Apr 17, 2010, at 3:15 AM, matthijs(a)cacholong.nl wrote:
>
>> On Apr 16, 2010, at 6:01 PM, Howard Chu wrote:
>>> If Peter wants his patch considered for inclusion in OpenLDAP he =
>> should write to the ITS himself, we cannot accept 3rd party =
>> contributions.
>>
>> What's the reasoning behind this?
>
> 3rd parties (middle men) not only hinder good communication between the authors(s) of the contribution and the Project/Foundation, they introduce various risks to both the author and the Project/Foundation.
>
> Regard, Kurt (Executive Director, The OpenLDAP Foundation)
>
Hi,
Thanks for the explanation, I'll keep it in mind when forwarding patches
and / or bug reports from the Debian bugtracker.
Regards,
Matthijs Mohlmann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkvKDnUACgkQ2n1ROIkXqbDFtwCgjOrjYmDPXtqYpQrQTNzq7gqL
RcsAmgKRRJB28cke29WMHhKIIcB/+q7L
=QTpi
-----END PGP SIGNATURE-----
> It's not clear to me where the issue is. What is the "right" sequence the
> add of the new superior and the mordrdn should be transmitted? Should the
> provider operate differently, or should the consumer check all syncrepl
> messages and try to rebuild the final state, instead of giving up when the
> internal lookup for the newsuperior fails? Probably, a workaround could
> be to perform the modrdn by crating the new superior as a glue object,
> which eventually will be replaced by the actual add.
I've quickly hacked things this way, and it seems to work fine.
<ftp://ftp.openldap.org/incoming/pierangelo-masarati-2010-04-17-sync-rename.…>
Please let me know if this approach is sound enough, I might have
overlooked some implications.
p.
>> Full_Name: Julien COMBES
>> Version: 2.4.21
>> OS: Debian 5.0.4
>> URL: ftp://ftp.openldap.org/incoming/its-syncrepl-loop-moddn.tar.bz2
>> Submission from: (NULL) (212.23.175.185)
>>
>>
>> Hello,
>>
>> I think I have found a loop problem with syncrepl replication with
>> openldap
>> 2.4.21, BDB 4.7.25 with all patches and hdb database. The problem
>> appears
>> sometimes when an entry is moved with "modrdbn -s" in a node which has
>> just been
>> created. I have reproduced the problem with the creation of a node and a
>> moddn
>> while the consumer was stopped and then restarted after.
>>
>> The problem follows these steps :
>> - When it starts, the consumer does a request objectClass=* on the
>> provider :
>> Feb 12 09:09:19 ldapma24-ida01 slapd[30445]: conn=1007 op=1 SRCH
>> base="dc=my,dc=domain" scope=2 deref=0 filter="(objectClass=*)"
>>
>> - The consumer finds the modrdn and tries to do this :
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]:
>> ==>hdb_modrdn(cn=user1,ou=A,dc=my,dc=domain,cn=user1,ou=X,dc=my,dc=domain)
>>
>> - The consumer fails with these errors :
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: =>
>> hdb_dn2id("ou=x,dc=my,dc=domain")
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: <= hdb_dn2id: get failed:
>> DB_NOTFOUND: No matching key/data pair found (-30988)
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: hdb_modrdn:
>> newSup(ndn=ou=x,dc=my,dc=domain) not here!
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: send_ldap_result: conn=-1
>> op=0 p=0
>> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: send_ldap_result: err=32
>> matched=""
>> text="new superior not found"
>>
>> - The consumer retries the request objectClass=* on the provider and
>> loops on
>> the problem. The replication doesn't work anymore.
>>
>> To reproduce the problem, I have used these steps :
>> - start an empty provider
>> - ldapadd the entries in mydomain.ldif
>> ldapadd -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -f mydomain.ldif
>> - start the consumer.
>> - stop the consumer when replication is finished
>> - ldapadd the new node
>> ldapadd -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -f add.ldif
>> - modrdn -s
>> ldapmodrdn -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -r -s
>> "ou=X,dc=my,dc=domain"
>> "cn=user1,ou=A,dc=my,dc=domain" "cn=user1"
>> - start the consumer
>>
>> I join in its-syncrepl-loop-moddn.tar.bz2 :
>> - slapd.conf of provider and consummer
>> - log files of provider and consummer
>> - mydomain.ldif and add.ldif
>
> Thanks for the detailed report. The bug is confirmed, and it's not
> related to back-hdb, but seems to be syncrepl-related in general.
It's not clear to me where the issue is. What is the "right" sequence the
add of the new superior and the mordrdn should be transmitted? Should the
provider operate differently, or should the consumer check all syncrepl
messages and try to rebuild the final state, instead of giving up when the
internal lookup for the newsuperior fails? Probably, a workaround could
be to perform the modrdn by crating the new superior as a glue object,
which eventually will be replaced by the actual add.
p.
> Full_Name: Julien COMBES
> Version: 2.4.21
> OS: Debian 5.0.4
> URL: ftp://ftp.openldap.org/incoming/its-syncrepl-loop-moddn.tar.bz2
> Submission from: (NULL) (212.23.175.185)
>
>
> Hello,
>
> I think I have found a loop problem with syncrepl replication with
> openldap
> 2.4.21, BDB 4.7.25 with all patches and hdb database. The problem appears
> sometimes when an entry is moved with "modrdbn -s" in a node which has
> just been
> created. I have reproduced the problem with the creation of a node and a
> moddn
> while the consumer was stopped and then restarted after.
>
> The problem follows these steps :
> - When it starts, the consumer does a request objectClass=* on the
> provider :
> Feb 12 09:09:19 ldapma24-ida01 slapd[30445]: conn=1007 op=1 SRCH
> base="dc=my,dc=domain" scope=2 deref=0 filter="(objectClass=*)"
>
> - The consumer finds the modrdn and tries to do this :
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]:
> ==>hdb_modrdn(cn=user1,ou=A,dc=my,dc=domain,cn=user1,ou=X,dc=my,dc=domain)
>
> - The consumer fails with these errors :
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: =>
> hdb_dn2id("ou=x,dc=my,dc=domain")
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: <= hdb_dn2id: get failed:
> DB_NOTFOUND: No matching key/data pair found (-30988)
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: hdb_modrdn:
> newSup(ndn=ou=x,dc=my,dc=domain) not here!
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: send_ldap_result: conn=-1
> op=0 p=0
> Feb 12 09:09:19 ldapra24-ida01 slapd[12156]: send_ldap_result: err=32
> matched=""
> text="new superior not found"
>
> - The consumer retries the request objectClass=* on the provider and
> loops on
> the problem. The replication doesn't work anymore.
>
> To reproduce the problem, I have used these steps :
> - start an empty provider
> - ldapadd the entries in mydomain.ldif
> ldapadd -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -f mydomain.ldif
> - start the consumer.
> - stop the consumer when replication is finished
> - ldapadd the new node
> ldapadd -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -f add.ldif
> - modrdn -s
> ldapmodrdn -x -h 127.0.0.1 -D "dc=my,dc=domain" -W -r -s
> "ou=X,dc=my,dc=domain"
> "cn=user1,ou=A,dc=my,dc=domain" "cn=user1"
> - start the consumer
>
> I join in its-syncrepl-loop-moddn.tar.bz2 :
> - slapd.conf of provider and consummer
> - log files of provider and consummer
> - mydomain.ldif and add.ldif
Thanks for the detailed report. The bug is confirmed, and it's not
related to back-hdb, but seems to be syncrepl-related in general.
p.
> Full_Name: Himmelbauer
> Version: 2.4.19
> OS: Gentoo Linux
> URL: ftp://ftp.openldap.org/incoming/himmelbauer-100301.patch
> Submission from: (NULL) (92.248.100.200)
>
>
> Was not able to retrieve database entries from a corrupted LDAP database
> using
> slapcat (openldap 2.4.19) with option -c. It aborts after the first
> corrupted
> entry with
>
> <= entry_decode: slap_str2undef_ad(object�!p):
> AttributeDescription
> contains inappropriate characters
> # no data for entry id=xxxxxxxx
>
> and doesn't continue with the next valid entry as I would have expected.
>
> A damaged database is not good, but as slapcat is described as the tool to
> recover the non-corrupted data in various forums, it would be good when it
> really continues on errors. Other ldap-related tools like ldapsearch
> ignore the
> damaged data, so it is really annoying, when you want to recover your data
> and
> don't even get all the readable entries.
>
> The patch corrects the handling of damaged entries by slapcat when -c is
> used,
> so that the output is continued with the next non-damaged entry. When -c
> is not
> used slapcat stops after the first corrupted entry (as expected).
>
> The patch works for me, but I know that it is not really correct, because
> when
> there would be no non-damaged entry left it would either cause a endless
> loop or
> some crashes.
>
> So a modification would be needed to stop the loop when the last database
> entry
> was processed, but I didn't know how to access that id.
I do not quite understand this report and your fix. The code seems to
work as intended. "continue" here means keep processing the database if
an entry can't be extracted from the database. This does by no means
imply that processing can always continue. If the database is corrupted,
it is likely that from the first appearance of the corruption, not even
the next entry id can be retrieved at all. Otherwise, if the only error
consists in not being able to extract an entry, continuation occurs as
expected in the current code.
What likely happened in your case was that as soon as the database
corruption was encountered, be_entry_next() was unable to compute the id
of the next entry. This is why you don't even get a log of the ids of the
entries that couldn't be extracted.
I'd close this ITS.
p.