Issue 7077 - olcMirrorMode implicit change not seen in cn=config
Summary: olcMirrorMode implicit change not seen in cn=config
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.26
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 14:39 UTC by christopher_wood@pobox.com
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description christopher_wood@pobox.com 2011-11-03 14:39:40 UTC
Full_Name: Christopher Wood
Version: 2.4.26
OS: Debian 6 (Squeeze)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (173.206.227.67)


Quoth Howard Chu:

"There's a bit of a glitch here; when you modify the olcSyncrepl attribute, it
is internally a delete followed by an add. When the delete occurs, the
olcMirrorMode flag is implicitly turned off. (Because it is only allowed to be
On for a database that is being replicated.) When the add occurs, the flag is
not automatically turned back on.

"The solution is to set it explicitly in your LDAPModify request."

http://www.openldap.org/lists/openldap-technical/201109/msg00010.html

The issue is that when this implicit flag toggle happens, the directory still
reports that olcMirrorMode is TRUE.

Assuming starting with a working MMR pair, this reproduces the issue:


$ ldapmodify -x -w password -D 'cn=config' -h ldapmm1

dn: olcDatabase={0}config,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: password2
-
replace: olcSyncrepl
olcSyncrepl: rid=1 provider=ldap://ldapmm1 binddn="cn=config" bindmethod=simple
credentials=password2 searchbase="cn=config" type=refreshAndPersist retry="5 5
30 +" timeout=5
olcSyncrepl: rid=2 provider=ldap://ldapmm2 binddn="cn=config" bindmethod=simple
credentials=password2 searchbase="cn=config" type=refreshAndPersist retry="5 5
30 +" timeout=5

modifying entry "olcDatabase={0}config,cn=config"


dn: olcDatabase={0}config,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: password3

modifying entry "olcDatabase={0}config,cn=config"
ldap_modify: Server is unwilling to perform (53)
        additional info: shadow context; no update referral


$ ldapsearch -x -w password2 -D 'cn=config' -b 'olcDatabase={0}config,cn=config'
-s base -h ldapmm1 '' 'olcMirrorMode'
# extended LDIF
#
# LDAPv3
# base <olcDatabase={0}config,cn=config> with scope baseObject
# filter: (objectclass=*)
# requesting:  olcMirrorMode 
#

# {0}config, config
dn: olcDatabase={0}config,cn=config
olcMirrorMode: TRUE

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Comment 1 Howard Chu 2011-11-05 21:48:56 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 2 Quanah Gibson-Mount 2011-11-07 21:32:45 UTC
changed notes
changed state Test to Release
Comment 3 Quanah Gibson-Mount 2011-11-28 18:40:52 UTC
changed notes
changed state Release to Closed
Comment 4 OpenLDAP project 2014-08-01 21:04:39 UTC
fixed in master
fixed in RE24