[Date Prev][Date Next] [Chronological] [Thread] [Top]

Enforce serverID 0 is for single-master only

ServerID 0 should be reserved for single-master configurations, ref
http://www.openldap.org/lists/openldap-bugs/200809/msg00131.html.  But
this is neither enforced in the code, nor mentioned in the doc. as far
as I can see.

Reserving serverID 0 for the single-master case would make it easier to
distinguish between old single-master and new multi-master configuration
based on the SID of the CSNs.  But the main benefit would be to catch
the apparently far too common configuration error of failing to set a
correct serverID in multi master configurations. Is it OK if I implement it?

This would mean that slapd would refuse to start if syncrepl or syncprov
finds a contextCSN value with SID=0 in the database upon startup and there is more than one contextCSN, or if MirrorMode is enabled. Syncrepl should refuse to receive updates to contextCSN values under the same conditions, and tear down the connection (and retry later) if one is seen.

Syncprov should also refuse slapd to start if serverID is 0 and
MirrorMode is enabled or any contextCSN with non-zero SIDs are found.
This would require a non-zero serverID also on pure forwarding servers
that never changes anything by them self.  But I think this minor
drawback is worth it if it allows us to catch the serverID configuration
errors.  Syncrepl should probably allow serverID 0, so that pure
consumers can exist without requiring separate serverID values.