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

Re: Extend slapd -c option to accept only sid=XXX?



Rein Tollevik wrote:
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..

I would expect ldapmodify with relax/manage control to work as well.

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.

No. The rid=xxx is required; that's the only key that associates anything with a particular syncrepl instance.


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

Which "the contextcsn" are you referring to? Without the rid, we don't have any idea which database is relevant.


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.

Comments?

Just use ldapmodify.

Chasing down the -c function isn't useful anyway since it requires a server restart. If ldapmodify currently doesn't give you what you want, then that should be fixed.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/