Justin B Newman
2009-Apr-22 16:50 UTC
[Puppet Users] puppet, openvz, hundreds of files, hundreds of sockets
Greetings! I have a puppet server and client, both running version 0.24.5. They are running atop debian/lenny, in openVZ containers. (As such, I can (and to some degree must) readily monitor tcp socket counts and buffer sizes). I have the following in a class file: file { "/usr/local/xyz/etc/keys": mode => 644, owner => "xyz", source => "puppet://puppet.mydomain.com/files/xyz/keys", recurse => "true", } The directory has about 700 files in it. It used to have 1400, but I trimmed it down... It appears that the client application opens a tcp socket for every one of those files when it runs, as it computes the checksum. When it hits 1024 sockets open, it is unable to open additional sockets. This shouldn''t be a problem, though... after all, I only have about 700 files. But, unfortunately, when it completes its run, it doesn''t release the sockets. :-( Therefore, 2 runs and ... yeap ... it''s done for. I suspect that if I reconfigured the box such that puppet ran from cron, I would have a workaround. That said, I doubt this is the only time someone will try this. Here are my client logs: Apr 22 16:29:20 dkim puppetd[9603]: Reopening log files Apr 22 16:29:20 dkim puppetd[9603]: Starting Puppet client version 0.24.5 Apr 22 16:29:22 dkim puppetd[9603]: Starting catalog run Apr 22 16:33:33 dkim puppetd[9603]: Finished catalog run in 251.53 seconds Apr 22 16:35:22 dkim puppetd[9603]: Other end went away; restarting connection and retrying Apr 22 16:35:23 dkim puppetd[9603]: Starting catalog run Apr 22 16:37:16 dkim puppetd[9603]: (//Node[xyz.domain.com]/xyz/File[/ usr/local/xyz/etc/keys/domain.com.key]) Failed to retrieve current state of resource: Too many open files - /usr/local/xyz/etc/keys/ domain.com.key Apr 22 16:37:16 dkim puppetd[9603]: Could not find server puppet.domain.com: getaddrinfo: Temporary failure in name resolution Incidentally, the server never reports more than 188 tcp sockets open. I''m guessing y''all would like more data. If you can point me to specific instructions for obtaining said data, I''ll be happy to respond. Many thanks in advance for any help you can provide. Sincerely, -jbn Justin B Newman --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Robin Sheat
2009-Apr-23 03:31 UTC
[Puppet Users] Re: puppet, openvz, hundreds of files, hundreds of sockets
On Thursday 23 April 2009 04:50:10 Justin B Newman wrote:> It appears that the client application opens a tcp socket for every > one of those files when it runs, as it computes the checksum. When it > hits 1024 sockets open, it is unable to open additional sockets. ThisI had exactly the same problem. The best fix I found was to upgrade puppet to 0.24.8. -- Robin <robin@kallisti.net.nz> JabberID: <eythian@jabber.kallisti.net.nz> http://www.kallisti.net.nz/blog ||| http://identi.ca/eythian PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D