So here's what is on my mind regarding this.  Suggestions are welcome. 
  
 `/var/run` is a good place to put the PID file, which as previously mentioned
is also the lock file.  Mounting the same database from two different instances
of `citserver` would be A Bad Thing.  (Even though I'm still freaking amazed
at how stable the database has become once we switched to the mmap-backed
environment ... I still can't make it go corrupt no matter how hard I try.)

  
 On a regular machine, or in a jail, `/var/run` is in the right place, and
does the right thing. 
  
 In a container ... `/var/run` will not be in the same persistent volume as
the database.  That means someone could accidentally start up two containers
that have different `/var/run` but the same `/usr/local/citadel/data` with
catastrophic results. 
  
 I'm tossing around a couple of ideas: 
  
 * Writing the pid file to both $ctdldir/citadel.lock
*and* /var/run/citserver.pid 
  
 * Making /var/run/citserver.pid a symbolic link to $ctdldir/citadel.lock

  
 I really don't want to make the containerized version harder to use. 
 

Reply via email to