Created attachment 452004 [details] scripts by Rich: PYTHONPATH=/path/to/directory/containing/dsadmin.py/ PREFIX=/path/to/localinstall (or just omit PREFIX if you are using an rpm installation) python /path/to/bug628791.py Description of problem: An error occurs in changelog db when the attached script configures MMRs. [..] NSMMReplicationPlugin - Beginning total update of replica "agmt="cn=meTolocalhost.localdomain1210" (localhost:1210)". [..] NSMMReplicationPlugin - Finished total update of replica "agmt="cn=meTolocalhost.localdomain1210" (localhost:1210)". Sent 160 entries. [..] - libdb: Transaction specified for a DB handle opened outside a transaction [..] NSMMReplicationPlugin - changelog program - _cl5WriteOperation: failed to write entry with csn (4caa35ab000000010000); db error - 22 Invalid argument [..] NSMMReplicationPlugin - write_changelog_and_ruv: can't add a change for dc=example,dc=com (uniqid: f9d6a323-cff311df-81009ff6-f6ed2452, optype: 8) to changelog csn 4caa35ab000000010000 This problem was introduced with this change: Bug 633168 - Share backend dbEnv with the replication changelog Note: the error message "Transaction specified for a DB handle opened outside a transaction" exists only in db-4.3.29 or older. There is a corresponding error in db-4.6 or newer "Transaction specified for a non-transactional database". But the error message was not observed on Fedora 13 & 14 (db4-4.8.30-1.fc13.x86_64, db4-4.8.30-2.fc14.i686)
Created attachment 452044 [details] git patch file (master) Description: DBENV open flags is used to determine the DB_OPEN mode whether to set DB_AUTO_COMMIT or not. The info was eliminated in the change made for "Bug 633168 - Share backend dbEnv with the replication changelog". This patch picks up the backend dbenv openflags and uses it for the changelog DB_OPEN. Files: ldap/servers/plugins/replication/cl5_api.c ldap/servers/slapd/back-ldbm/dblayer.c ldap/servers/slapd/slapi-plugin.h
Reviewed by Rich (Thanks!!) Pushed to master. $ git merge work Updating 9a00a44..3604c48 Fast-forward ldap/servers/plugins/replication/cl5_api.c | 8 +++++++- ldap/servers/slapd/back-ldbm/dblayer.c | 12 ++++++++++++ ldap/servers/slapd/slapi-plugin.h | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-) $ git push Counting objects: 21, done. Delta compression using up to 2 threads. Compressing objects: 100% (11/11), done. Writing objects: 100% (11/11), 1.37 KiB, done. Total 11 (delta 9), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 9a00a44..3604c48 master -> master
Hi Noriko, Seems that this bug was for older DS versions. How should I verify this one with 389-ds. Thanks, Amita
(In reply to comment #3) > Hi Noriko, > > Seems that this bug was for older DS versions. > How should I verify this one with 389-ds. > > Thanks, > Amita Hi Amita. The bug is in ds-replication code. Could you still verify this bug? The error message which should not appear in the error log would be: "Transaction specified for a non-transactional database". Thanks! --noriko
Executed the Python script attached but got error setup c1 to chain to ldap://localhost.localdomain:1200 localhost.localdomain:1210/ bind to c1 as uid=scarter turn on error logging on c1 shutdown m1 - see if still can search Traceback (most recent call last): File "bug628791.py", line 98, in <module> userc1.search_s(userdn, ldap.SCOPE_BASE) File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 516, in search_s return self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout) File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 510, in search_ext_s return self.result(msgid,all=1,timeout=timeout)[1] File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 436, in result res_type,res_data,res_msgid = self.result2(msgid,all,timeout) File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 440, in result2 res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout) File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 446, in result3 ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout) File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 96, in _ldap_call result = func(*args,**kwargs) ldap.OPERATIONS_ERROR: {'info': "Can't contact LDAP server", 'desc': 'Operations error'} Please guide.
(In reply to comment #5) > Executed the Python script attached but got error > setup c1 to chain to ldap://localhost.localdomain:1200 > localhost.localdomain:1210/ > bind to c1 as uid=scarter > turn on error logging on c1 > shutdown m1 - see if still can search > Traceback (most recent call last): > File "bug628791.py", line 98, in <module> > userc1.search_s(userdn, ldap.SCOPE_BASE) > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 516, in > search_s > return > self.search_ext_s(base,scope,filterstr,attrlist,attrsonly,None,None,timeout=self.timeout) > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 510, in > search_ext_s > return self.result(msgid,all=1,timeout=timeout)[1] > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 436, in > result > res_type,res_data,res_msgid = self.result2(msgid,all,timeout) > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 440, in > result2 > res_type, res_data, res_msgid, srv_ctrls = self.result3(msgid,all,timeout) > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 446, in > result3 > ldap_result = self._ldap_call(self._l.result3,msgid,all,timeout) > File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 96, in > _ldap_call > result = func(*args,**kwargs) > ldap.OPERATIONS_ERROR: {'info': "Can't contact LDAP server", 'desc': > 'Operations error'} > > Please guide. Right. See https://bugzilla.redhat.com/show_bug.cgi?id=628791#c5 - we should open another bug for that problem. Please verify bug 640854 has been fixed, then open another bug for 628791#c5.
No, I don't see "Transaction specified for a non-transactional database". in the error logs hence marking this bug as VERIFIED but for the comment#5, I am opening another bug.