[Date Prev][Date Next]
Extend slapd -c option to accept only sid=XXX?
There are (at least as far as I know) no other way than slapcat/slapadd
to get rid of any incorrect contextCSN values, at least on servers where
syncprov is enabled. I have been down that road some times already,
each time being equally annoyed by the fact that there are no easier way
to fix it..
Removing a contextCSN value is required in order to remove a server from
a multi-master configuration, or to get rid of the values with SID=0
that is far to easy to slip in if slapd or slapadd is started without
the proper serverID setting.
The slapd -c option requires a rid=XXX to be specified, but also allows
sid=XXX (which I haven't quite understood the usefulness of..). I
suggest that the -c option is extended to also allow only sid=XXX
without any rid.
With only sid=XXX,csn=XXX specified both syncrepl and syncprov should
replace the contextCSN value with that sid (as read from the database
upon startup) with the specified csn. Obviously, only a single csn
value can be accepted, and an absent or zero csn value should mean to
delete the contextCSN value with that sid. Well, deleting a contextCSN
value is really all I need, so I would be I more than happy to leave the
replace possibility out...
Adding an easy way to get rid of invalid contextCSN values should make a
transition to enforcing serverID 0 for single-master only configs much
more acceptable for those that have used serverID 0 in multi-master setups.