[389-devel] Regarding changing instance specific scripts to be "global/generic"

Rich Megginson rmeggins at redhat.com
Mon Feb 4 17:16:35 UTC 2013


On 02/04/2013 09:42 AM, Mark Reynolds wrote:
> There has been a request to remove instance specific scripts, and make 
> them generic and placed in /usr/sbin/
>
> https://fedorahosted.org/389/ticket/528
>
>
> Should we remove all the scripts from /usr/lib64/dirsrv/slapd-INSTANCE:
>
> bak2db          db2index     dn2rdn ldif2ldap            
> ns-newpwpolicy.pl  start-slapd usn-tombstone-cleanup.pl
> bak2db.pl       db2index.pl  fixup-linkedattrs.pl monitor              
> restart-slapd      stop-slapd verify-db.pl
> cleanallruv.pl  db2ldif      fixup-memberof.pl ns-accountstatus.pl  
> restoreconfig      suffix2instance vlvindex
> db2bak          db2ldif.pl   ldif2db ns-activate.pl       
> saveconfig         syntax-validate.pl
> db2bak.pl       dbverify     ldif2db.pl ns-inactivate.pl     
> schema-reload.pl   upgradednformat
>
> It appears almost of these are all instance specific.  Do we want to 
> make all of these "generic" and stick them in /usr/sbin?

Yes.
>
> However, I think it makes sense to keep some instance specific 
> scripts: monitor, stop/start/restart, maybe the "task" scripts too 
> (like schema reload, cleanallruv, fix-memberof, etc).  Then only make 
> the database scripts generic: db2ldif db2index, ldif2db, db2bak, 
> bak2db, etc.

One of the goals is to get any "dynamic" files out of /usr.  Most 
installations want to mount /usr read-only.  They do not want to mount 
/usr read-write in order to create or update a 389 instance.

IPA works around this by putting the instance specific scripts in 
/var/lib/dirsrv/scripts-INSTANCE - but most people aren't looking for 
389 maintenance commands under /var.

I don't think we need any instance specific scripts, but if we do, they 
should not be in /usr or /var.

We have already started to do this with the 
start-dirsrv/stop-dirsrv/restart-dirsrv scripts in /usr/sbin.  With no 
argument, they work on all instances, or accept the instance name as an 
argument.  This is fine for start/stop/restart, but might be a bit 
surprising for something like db2ldif, if it then does an export of all 
instances.  For all scripts other than start/stop/restart, I think the 
command should fail if the instance is not specified e.g.
# db2ldif ...
Error: More than one instance - specify the instance name as one of: foo 
bar ...other instance names...

The other nice thing about the start-dirsrv etc. scripts is that they 
use the instance information from /etc/sysconfig/dirsrv-* to look for 
the dse.ldif, log files, etc.  That removes the need for an instance 
specific script created during instance creation time with "hardcoded" 
instance specific values.


> Just curious what everyone thinks about this.
>
> Thanks,
> Mark
>



More information about the 389-devel mailing list