Error when running "puppet agent --test"

120 views
Skip to first unread message

shred

unread,
Aug 29, 2014, 5:04:31 PM8/29/14
to puppet...@googlegroups.com
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

shred

unread,
Aug 29, 2014, 5:31:57 PM8/29/14
to puppet...@googlegroups.com
I also checked and the file exists and has the exact same permissions as the one on the working server.

Wil Cooley

unread,
Aug 29, 2014, 7:55:22 PM8/29/14
to puppet-users group
 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
Reply all
Reply to author
Forward
0 new messages