Closed alxwr closed 1 year ago
I meant you still can use onchanges
requisite to not invoke recursive operation on every Salt state run.
@vutny Thanks for your review!
@alxwr I wonder, could we use
file.directory
state function withrecurse
parameter instead of raw chmod/chown commands?
recurse
is extremely slow. Up to the point of "minion did not respond". (I was so glad when I figured out this was the bottleneck! :-)
The only OS (I can think of) where chown/chmod won't work is Windows. I'll wrap the code in if grains.os_family != 'Windows'
, but I doubt anyone would run LibreNMS on Windows.
We could also enable chown/chmod only for Linux and FreeBSD and use recurse
for the rest. (But that's not exactly DRY...)
I meant you still can use
onchanges
requisite to not invoke recursive operation on every Salt state run.
That won't solve the underlying problem. :-(
@alxwr if I look at the new installation manuals from https://docs.librenms.org/Installation/
they have abandoned the git clone method and started with composer, shouldn't that solve a lot of problems, running composer as librenms
should fix the file permissions.
@aboe76 I'll try that. Thanks!
Instead of
file.directory
withrecurse: ['user', 'group']
the formula now useschmod
andchown
when it is necessary. This prevents a highly reproducilbeMinion did not return. [No response]
. :-)Tested on FreeBSD 11.2.