The problem is that if we already have a ServerID on the producer, it will never generate a contextCSN, waiting for the consumer to send one, or for an update to occur :
static int syncprov_db_open( BackendDB *be, ConfigReply *cr ) { ...
/* Didn't find a contextCSN, should we generate one? */ if ( !si->si_ctxcsn ) { char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ]; struct berval csn;
if ( slap_serverID || SLAP_SYNC_SHADOW( op->o_bd )) { /* If we're also a consumer, then don't generate anything. * Wait for our provider to send it to us, or for a local * modify if we have multimaster. */ goto out; }
At this point, nothing happens when teh consumer connects for teh very first time, because it is expected to send a contextCSN, which it obviously don't have.
I do think that the provider should always generate a contextCSN for its own data, when the syncprov overlay is added. that should solve the problem. Now, I don't know (yet) what would be the impact on replication if we do so.
Still investigating...