[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: continuous cache corruption behaviour ?
"Prashant K.S" wrote:
>
> Hi,
> check in self.ldap_server.delete_s(dn) function if
> you have made an ldap_bind to the rootdn with the
> correct rootdn and rootpw.I hope you have not done
> ldap_bind properly in delete.but have done it rightly
> in self.ldap_server.add_s(dn)
Hmm, what do you mean ? delete_s() and add_s() are not
functions that I made but the API for LDAP with Python
('s' for simple). I'm sure the rootdn and rootpw are correct,
because, as I wrote, nearly all of the calls are OK.
I'm calling the simple_bind_s() function at initialization.
Do I need to call it everytime I use a function ?
(just before add_s() AND just before delete_s()) ?
Thanks,
Luc
> I get strange behaviour from OpenLDAP when adding
> > NEW entries:
> >
> > I'm using OpenLDAP 1.2.10 on a Debian GNU/Linux 2.2
> > box. The LDAP
> > database
> > (which contains aliases) is interfaced with a
> > Postfix STMP mailer.
> > I've made a daemon that adds users to the LDAP
> > database in Python.
> > The only 'special' thing that it does is that it
> > tries to remove the
> > user before adding a new one (I don't test if it
> > exists or not, I delete
> > it):
> >
> > try:
> > self.ldap_server.delete_s(dn)
> > except:
> > pass
> > try:
> > self.ldap_server.add_s(dn,[
> > ('objectclass', ['virtualuser']),
> > ('cn',[username]),
> > ('mailacceptinggeneralid', [username]),
> > ('maildrop', [alias])
> > ])
> > except ldap.LDAPError,why:
> > print "Error adding user"
> > ...
> >
> > With this, what happens is that I get sometimes (not
> > every time) an
> > error
> > which says that the user already exists ! ({'desc':
> > 'Already exists'}).
> >
> > I don't understand how can this be possible, as I
> > delete anything before
> > adding a user. Moreover, when I look at the database
> > records, the user
> > doesn't exist (before invocation AND even after the
> > error) !
> >
> > Here are the entries I get in the logs:
> > slapd[11337]: conn=5480 fd=19 connection from
> > forwarder.domain.com
> > (214.66.34.61) accepted.
> > slapd[23792]: conn=5480 op=0 BIND
> > dn="CN=ADMIN,DC=DOMAIN,DC=COM"
> > method=128
> > slapd[23792]: conn=5480 op=0 RESULT err=0 tag=97
> > nentries=0
> > slapd[23793]: conn=5480 op=1 DEL
> > dn="CN=SOMEUSER@DOMAIN.COM,DC=DOMAIN,DC=COM"
> > slapd[23793]: conn=5480 op=1 RESULT err=32 tag=107
> > nentries=0
> > slapd[23794]: conn=5480 op=2 ADD
> > dn="CN=SOMEUSER@DOMAIN.COM,DC=DOMAIN,DC=COM"
> > slapd[23794]: ====> entry
> > cn=someuser@domain.com,dc=domain,dc=com id
> > 6255 already in id cache
> > slapd[23794]: cache_add_entry_lock failed
> > slapd[23794]: conn=5480 op=2 RESULT err=68 tag=105
> > nentries=0
> >
> > Can anyone explain me why OpenLDAP returns these
> > errors ? Is my database
> > corrupted ?
--
Luc Stepniewski <lstep@banquise.org> <http://lstep.free.fr/>
Adequat - Securite, Linux Public key:
<http://lstep.free.fr/pubkey.txt>
Key D93B2D2D fingerprint = 49 00 CC D1 69 03 E2 94 C8 78 ED 3C 75 89 A8
DE