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

Re: Why did an index broke my config ?



On Saturday, 8 August 2009 14:42:49 Denis BUCHER wrote:
> Olivier Rademakers a écrit :
> >> I added this in the config of my email server :
> >>> index virtualdomain                     eq
> >>
> >> But it broke the mail server, all emails were refused because Relaying
> >> denied. In fact postfix was not able anymore to find domains.
> >>
> >> For some reason, adding this index in the config made impossible to find
> >> this domain for programs...
> >>
> >> Don't know if my explanation is clear, but my question is "why adding an
> >> index breaks the config" ?
> >>
> >> Thanks a lot in advance for any help !
> >
> > By specifying in your config file the indexation of the attribute
> > virtualdomain, the server will expect to find such an index, but if you
> > have not created the index beforehand, the server will not find the
> > attribute. I believe that in your case, you must run slapindex while the
> > server is offline and your troubles should be over.
> >
> > Cheers,
> > Olivier
>
> OK thanks a lot, that's what I supposed (after having problems) but was
> not sure... I should have better read the documentation before...
>
> BTW isn't this behavior of LDAP a little dangerous, shouldn't openldap
> say something like "index not found" ?

How is slapd supposed to tell the difference between "previously no entries had 
this attribute, even though we wanted to index it", and "previously we had 
entries with this attribute, but we didn't want to index it" ? The only data 
at slapd's disposal (no existing index for this attribute) can be explained by 
both of the above conditions, and any method for distinguishing between them 
will make other index operations potentially very expensive.

I note that if you were using back-config for configuration, the index would be 
generated by slapd when it is added (since slapd then knows that it is a new 
index).

Regards,
Buchan