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

Re: (ITS#3461) slaptest fails if db needs creation



ando@sys-net.it wrote:

>Aaron Richton wrote:
>
>  
>
>>bash-2.05# rm -f /var/openldap-data/*/*db* /var/openldap-logs/*/log*
>>bash-2.05# slaptest
>>slap_startup failed
>>bash-2.05# rm -f /var/openldap-data/*/*db* /var/openldap-logs/*/log*
>>bash-2.05# slaptest -u
>>config file testing succeeded
>>
>>
>>looks good.
>>
>>"slap_startup failed" perhaps should say "slap_startup failed -- try -u switch?"
>>I'm just envisioning installing some big upgrade at 6AM and wondering
>>where the nonexistent syntax bug is...
>> 
>>
>>    
>>
>In principle, if it gets there the test passed, only slap_startup() 
>fails, whatever the reason.  Retrying with -u will surely succeed, 
>because slap_startup() wouldn't be invoked at all.  I changed the 
>message to state so:
>
>[masarati@ando tests]$ ../servers/slapd/slaptest -f testrun/slapd.1.conf
>slap_startup failed (test would succeed using the -u switch)
>[masarati@ando tests]$ ../servers/slapd/slaptest -f testrun/slapd.1.conf -u
>config file testing succeeded
>  
>
I'm no longer sure that the fix is fine.  slaptest should fail if the 
directory doesn't exist or if it cannot be opened, not if the database 
doesn't exist.  In fact, the first time slapd/slapadd is run the 
database doesn't exist, but everything is fine.  The point is that 
back-bdb is failing bi_db_open() if the database files cannot be opened 
when slapd is run in tool mode.  I think there should be an exception 
for slaptest, or slaptest shouldn't try to startup the databases.

p.



    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497