[Date Prev][Date Next]
Re: (ITS#5536) Always use a configured serverID in the syncrepl cookie
> Full_Name: Rein Tollevik
> Version: CVS head
> OS: linux and solaris
> URL: ftp://ftp.openldap.org/incoming/rein-serverID.patch
> Submission from: (NULL) (126.96.36.199)
> Submitted by: rein
> Syncrepl includes the serverID in the syncCookie in multi-master mode only, but
> there are other configuration that would benefit from it as well.
> A case I have is where a consumer replicates a glue'ed database, with the
> exception of one subordinate backend where the consumer is the master. The
> subordinate backend is replicated back to the master of the glue'ed database.
> With the current code the master would send the content of the subordinate db
> back to its master.
Understood. In fact, having multiple sources of data in a glued tree is really
a form of multi-master. (The separate glued branches cannot cause
inconsistencies with each other, but still their contextCSNs must be managed
> A patch that fixes this is at the referenced URL. As I am not sure of the
> consequences if a defaulted serverID=0 value was included in the syncCookie the
> patch changes the internal default slap_serverID value to -1 to make it possible
> to differentiate between a configured and defaulted serverID=0.
> Btw, there are potential problems with using serverID=0, so it would be best if
> that value was reserved for the default unconfigured case. I.e, a default
> serverID=0 value could be chosen be slapadd when the two-argument form of
> serverID is used in the config, as resolving the URL needs the listener argument
> to slapd to succeed.
You mean the three-argument form? The two-argument form only allows a single
serverID to be configured anyway, so there is no ambiguity there. But you're
right, in tool mode when multiple serverIDs are configured, there's no way for
it to choose the right serverID. That's a problem regardless of whether the
default is 0 or -1 though.
For now I think this is a doc issue; we could simply recommend that slapadd
always be performed on the node with ID 0, and you manually change the
serverID config if you need to slapadd on some other node.
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/