[NBLUG/talk] Why have directories in /var/run if they're not persistent through reboot?

Tom Most twm at freecog.net
Wed Aug 2 20:36:29 PDT 2017


On 07/31/2017 12:36 AM, Zack Zatkin-Gold wrote:
> It's not so much about creating the directory that is the issue.  If I
> use Puppet to orchestrate a server's provisioning, thus ensuring that
> the directory exists, Puppet doesn't run when the server reboots,
> therefore the directory doesn't get created.  It is likely a side
> effect of deviating from application defaults, i.e. not letting a
> particular application handle PID file creation on its own.
Okay, that's your problem. Puppet is not the tool that should be
responsible for creating the directory. That duty should fall to the
application or, if you can't fix the application, a wrapper script.
Puppet's duties should be installing the package containing the
application, and enabling the service to run (if necessary; defaults
vary by distribution).

In telecom-speak, Puppet is part of the management plane, not the data
plane. It should ideally set up the system such that it would continue
running correctly even if Puppet never runs again. So, for example, you
shouldn't need to run Puppet to restart a crashed service, or rotate log
files.

---Tom


More information about the talk mailing list