[Pkg-puppet-devel] Bug#1070744: Bug#1070744: /usr/bin/puppet: puts non-regeneratable data in /var/cache

Hendrik Jaeger debian-bugs at henk.geekmail.org
Thu Oct 24 10:18:18 BST 2024


Hi

On Wed, 4 Sep 2024 10:54:45 -0400
Jérôme Charaoui <jerome at riseup.net> wrote:

> The $libdir variable in puppet.conf is already set to /var/lib/puppet, 

Are you sure?
On my systems:
```
# puppet config print libdir
/var/cache/puppet/lib
```

But also, given what https://www.puppet.com/docs/puppet/8/dirs_vardir says about it, I think it being under /var/cache is correct:
> Puppet uses this as a cache for plugins (custom facts, types and providers, functions) synced from a primary server. Do not change its contents. If you delete it, the plugins are restored on the next Puppet run.

because its content is really just cached content and will be recreated from the server and it is supposed to be managed by the application, not the human.
(But also: this is besides the point of this bug report.)

> The upstream docs describe both parameters as such:

Which page are you looking at?

> vardir: Where Puppet stores dynamic and growing data.

https://www.puppet.com/docs/puppet/8/dirs_vardir says:
> As part of its normal operations, Puppet generates data which is stored in a cache directory called vardir.

> So maybe vardir could be /var/lib/puppet and libdir: $vardir/ruby ?

According to upstream, the vardir is actually for caching stuff, so IMHO generally vardir being in /var/cache is not wrong.
What I consider wrong, though, is putting reports there, as they cannot be regenerated which is what the FHS demands on data put there.
And this should probably be forwarded upstream.
(The same may be said about other things, like `bucketdir` and `clientbucketdir`, neither of which can be regenerated. But that should be a separate bug to not inflate this one!)

To make a concrete suggestion:
set reportdir = $logdir/reports

What do you think?



More information about the Pkg-puppet-devel mailing list