On Fri, Aug 29, 2014 at 2:04 PM, shred <teddak...@gmail.com> wrote:

> I have 3 identical servers. 2 of them work fine when I run "puppet agent
> --test". However the 3rd one generates this error and cannot complete the
> puppet run. Any ideas as to whats causing this?
>
> Error: No such file or directory - /proc/sys/fs/file-max.puppettmp_2620
> Error: /Stage[main]/Zope::Build/File[/proc/sys/fs/file-max]/content:
> change from {md5}24eba3d1d32a58ff27cc7ae65f55e541 to
> {md5}1c33b978ee4d28b707ab51c3ca28acc4 failed: No such file or directory -
> /proc/sys/fs/file-max.puppettmp_2620
>

 It looks like you're trying to manage the contents of
/proc/sys/fs/file-max as a file resource, correct? Try adding 'backup =>
false', although I am not sure that will work either. The problem is that
files and directories under /proc aren't normal files and directories, so
Puppet's normal mode of replacing a file (upload to a temp file in the same
directory and then mv it into place) doesn't work. I suspect the other two
aren't failing because they are already set to the value you want (maybe
because you did it manually).

You might have better luck managing /etc/sysctl.conf as a file, then using
an exec to run 'sysctl -p'. Then your setting would persist and be set on
boot, rather than having to wait for Puppet to run. (Assuming you're using
a distro that supports this; most of the mainstream ones do.)

Best of all would be to use one of the several modules on Puppet Forge to
manage the setting. Unfortunately there are 15 to choose from; I would
probably look at the 4 that have more than 10k downloads and see which has
the better test coverage.

Wil

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAMmm3r5U8f2D9JaLP7bzR%3DybFvJg4k1hWQhFaPt42r8CBfqpag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to