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

Changing serverID considered harmful



This one caused some head-scratching recently so just in case
anyone else comes across it...

I was updating the OpenLDAP installation for a customer, and part
of the work involved converting from a single server to a
mirrormode pair with some read-only slaves. The sequence of events
was:

1)	Dump old server to LDIF
2)	Update software from 2.3.x to 2.4.23
3)	Clear out and reload database from LDIF
4)	Many entries added, deleted, modified
5)	Second server introduced, mirrormode configured
	This involved adding 'serverID 1' to the original server config
	and restarting it.
6)	Read-only slave configured, pre-loaded from the same LDIF
7)	Slave started

The new servers updated using refreshAndPersist mode: they got all
the adds and changes but did not process any of the deletes.

The problem was introduced at stage 5: by changing from serverID
000 to serverID 001 I had broken an assumption in the code. I am
still not clear on exactly what went wrong, as I would expect the
server to simply regard all its current entries to have come from
some other master server. The effect was reproducable though: no
deletes were processed by the consuming server.

The correct thing would be to set the serverID before loading the
initial data, but if that gets missed it seems to be OK to take a
new LDIF dump after changing the ID, and to use that to pre-load
replica servers.

Andrew
-- 
-----------------------------------------------------------------------
|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|     http://www.skills-1st.co.uk/                +44 1628 782565     |
-----------------------------------------------------------------------