Hi- Recently starting using puppet while migrating an existing messy group of systems to some nice new hardware. Things are going incredibly well, and puppet''s functioning great. Have a bit of a headache. I''d like to keep myself from duplicating lots of included classes. Lets say I have this (snippet of a) class: class dbserver { file { "/etc/my_${db}.cnf": require => package["mysql-server"], mode => 644, owner => "root", group => "root", source => "puppet://puppet/configs/my_${db}.cnf", alias => "${db}_cnf" }} The above my_${db}.cnf contains paths for socket files, the port, etc, making for a nice stand alone mysql instance. The problem I''m having is I''d like to be able to have multiple mysql instances on one box, so "include dbserver" in the node stanza in question a couple of times, resetting $db each time. Is this possible or should I just start creating separate classes? -charlie _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Tue, Feb 27, 2007 at 06:36:06PM -0500, Benatti, Curly wrote:> Hi- > > Recently starting using puppet while migrating an existing messy group > of systems to some nice new hardware. Things are going incredibly well, > and puppet''s functioning great. Have a bit of a headache. I''d like to > keep myself from duplicating lots of included classes. Lets say I have > this (snippet of a) class: > > class dbserver { > file { "/etc/my_${db}.cnf": require => > package["mysql-server"], mode => 644, > owner => "root", group => "root", source > => "puppet://puppet/configs/my_${db}.cnf", alias => > "${db}_cnf" }}Dear ghods, is that how it''s formatted in your manifest?> The above my_${db}.cnf contains paths for socket files, the port, etc, > making for a nice stand alone mysql instance. The problem I''m having is > I''d like to be able to have multiple mysql instances on one box, so > "include dbserver" in the node stanza in question a couple of times, > resetting $db each time. > > Is this possible or should I just start creating separate classes?Yep, it''s simple with define: define dbserver($db) { [everything more-or-less exactly as you have it already] } Then you instantiate it like an object, instead of including it as a class: dbserver { db => "faffenheimer" } dbserver { db => "something_funny" } dbserver { db => "puppet_is_teh_r0x0r" } - Matt -- "The RFCs say that if you get any 8-bit stuff you''re supposed to convert it into quoted-unreadable..." -- Phil Hazel, LCA 2004
On Feb 27, 2007, at 6:45 PM, Matthew Palmer wrote:> > dbserver { > db => "faffenheimer" > } > > dbserver { > db => "something_funny" > } > > dbserver { > db => "puppet_is_teh_r0x0r" > }That won''t work; Puppet now requires resources to have names. It looks like the ''db'' param is unnecessary here andyou could just use the name. -- God loved the birds and invented trees. Man loved the birds and invented cages. -- Jacques Deval --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Brendan Beveridge
2007-Feb-28 09:15 UTC
[Puppet-Users] Runaway child process using --listen
Hey All, When i try and run puppetd --debug --listen i get a child process that maxes out cpu when it tries to call apt or dpkg for checking packages: debug: Calling fileserver.describe debug: package provider apt: Executing ''/usr/bin/dpkg-query -W --showformat ${Status} ${Package} ${Version}\n rdoc'' If i kill the child proc that was spawned for this it continues with the next operation: debug: //citadel/template-node-syd/ubuntu/Package[rdoc]: Changing ensure debug: //citadel/template-node-syd/ubuntu/Package[rdoc]: 1 change(s) debug: //citadel/template-node-syd/ubuntu/Package[rdoc]/ensure: setting latest (currently absent) debug: package provider apt: Executing ''/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install rdoc'' This keeps repeating with every package i have set in the manifest. If i do a trace on the child proc: strace -p rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 sigprocmask(SIG_SETMASK, [], NULL) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 sigprocmask(SIG_SETMASK, [], NULL) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 sigprocmask(SIG_BLOCK, NULL, []) = 0 This is occuring on ubuntu 6.06 x86 with facter 1.3.6 and puppet 0.22.1 This also occurs on ubuntu 6.06 sparc with facter 1.3.6 and puppet 0.22.1 I noticed that there is already a ticket open for this #509: http://reductivelabs.com/trac/puppet/ticket/509 and i have appended this information to that ticket Cheers Brendan Brendan Beveridge Managed Services Consultant Direct | 02 8235 9593 Mobile | 0434 077 934 Email | Brendan.Beveridge@brennanit.com.au "Brennan IT lands major IT&T Outsourcing Deals." Click here to find out more. Sydney - Melbourne - Brisbane - Adelaide - Perth - Canberra | Phone | 02 8235 9595 | Fax | 02 8235 9594 | Web : http://www.brennanit.com.au _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 28 February 2007 01:48, Luke Kanies wrote:> On Feb 27, 2007, at 6:45 PM, Matthew Palmer wrote: > > dbserver { > > db => "faffenheimer" > > } > > > > dbserver { > > db => "something_funny" > > } > > > > dbserver { > > db => "puppet_is_teh_r0x0r" > > } > > That won''t work; Puppet now requires resources to have names. > > It looks like the ''db'' param is unnecessary here andyou could just > use the name.To spell it out: define db() { file { "/var/.../${name}": ... } } db { "muh": } Will translate to file { "/var/.../muh": ... } Regards, David - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF5VCA/Pp1N6Uzh0URArxiAJ4u7A0miHGuusTxKD4hIGoMGYHdfwCeNzq9 1tVFpxXRrKBp5M3YF3P+0PU=kG5O -----END PGP SIGNATURE-----
On Feb 28, 2007, at 3:15 AM, Brendan Beveridge wrote:> Hey All, > When i try and run puppetd --debug --listen > i get a child process that maxes out cpu when it tries to call apt > or dpkg for checking packages: > > debug: Calling fileserver.describe > debug: package provider apt: Executing ''/usr/bin/dpkg-query -W -- > showformat ${Status} ${Package} ${Version}\n rdoc'' > > If i kill the child proc that was spawned for this it continues > with the next operation:[...] So it seems like somehow --listen is causing either the child process itself, or the external command called by that process, to spin forever. It clearly isn''t consistent for everyone, because I''ve had puppet running on five platforms with --listen enabled for six months and haven''t had this happen yet, but it''s happening some. Hmm. Anyone have any ideas? I''ve already done what I could to make sure the ports aren''t still open in the child, but there''s clearly something still going on.> This keeps repeating with every package i have set in the manifest. > > If i do a trace on the child proc: > strace -p[...]> sigprocmask(SIG_BLOCK, NULL, []) = 0 > sigprocmask(SIG_BLOCK, NULL, []) = 0This is actually unrelated; (according to Matt Palmer, and I believe him) this is how ruby does non-blocking IO. -- In our civilization, and under our republican form of government, intelligence is so highly honored that it is rewarded by exemption from the cares of office. --Ambrose Bierce --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Blake Barnett
2007-Feb-28 18:39 UTC
Re: [Puppet-Users] Runaway child process using --listen
On Feb 28, 2007, at 1:15 AM, Brendan Beveridge wrote:> Hey All, > When i try and run puppetd --debug --listen > i get a child process that maxes out cpu when it tries to call apt > or dpkg for checking packages:What port do you have puppetd listening on? Anything other than the default? If it''s below 1024 that might cause and issue... Do you have a valid namespaceauth.conf? Those are the two things I''ve had issues with when using the listen feature. -Blake
On 2/28/07, Luke Kanies <luke@madstop.com> wrote:> > So it seems like somehow --listen is causing either the child process > itself, or the external command called by that process, to spin forever. > > It clearly isn''t consistent for everyone, because I''ve had puppet > running on five platforms with --listen enabled for six months and > haven''t had this happen yet, but it''s happening some. Hmm. > > Anyone have any ideas? I''ve already done what I could to make sure > the ports aren''t still open in the child, but there''s clearly > something still going on. >My guess is that the problem is the open filehandle. Something in the exec or the program being run has a problem with the socket being open. - Ian
Brendan Beveridge
2007-Feb-28 21:56 UTC
Re: [Puppet-Users] Runaway child process using--listen
im using the default port (ie not specifying it) as for namespaceauth.conf i use [fileserver] allow server.domain.com [puppetmaster] allow server.domain.com [puppetrunner] allow server.domain.com server = puppetmasterd and puppetd below is the output of open files from puppetd # lsof | grep puppetd puppetd 12942 root cwd DIR 254,0 4096 58687489 /root puppetd 12942 root rtd DIR 254,0 4096 2 / puppetd 12942 root txt REG 254,0 3240 6051478 /usr/bin/ruby1.8 puppetd 12942 root mem REG 0,0 0 [heap] (stat: No such file or directory) puppetd 12942 root mem REG 254,0 68804 73908464 /lib/tls/i686/cmov/libresolv-2.3.6.so puppetd 12942 root mem REG 254,0 14744 73908429 /lib/tls/i686/cmov/libnss_dns-2.3.6.so puppetd 12942 root mem REG 254,0 131224 6096784 /usr/lib/ruby/1.8/i486-linux/nkf.so puppetd 12942 root mem REG 254,0 77368 6047409 /usr/lib/libz.so.1.2.3 puppetd 12942 root mem REG 254,0 1224120 6062309 /usr/lib/i686/cmov/libcrypto.so.0.9.8 puppetd 12942 root mem REG 254,0 247488 6062310 /usr/lib/i686/cmov/libssl.so.0.9.8 puppetd 12942 root mem REG 254,0 11100 6096787 /usr/lib/ruby/1.8/i486-linux/racc/cparse.so puppetd 12942 root mem REG 254,0 213244 6097690 /usr/lib/ruby/1.8/i486-linux/openssl.so puppetd 12942 root mem REG 254,0 14968 6096775 /usr/lib/ruby/1.8/i486-linux/digest/sha1.so puppetd 12942 root mem REG 254,0 6544 6096771 /usr/lib/ruby/1.8/i486-linux/digest.so puppetd 12942 root mem REG 254,0 8052 6096773 /usr/lib/ruby/1.8/i486-linux/digest/md5.so puppetd 12942 root mem REG 254,0 37432 73908430 /lib/tls/i686/cmov/libnss_files-2.3.6.so puppetd 12942 root mem REG 254,0 14200 6096792 /usr/lib/ruby/1.8/i486-linux/strscan.so puppetd 12942 root mem REG 254,0 35416 6096790 /usr/lib/ruby/1.8/i486-linux/socket.so puppetd 12942 root mem REG 254,0 7604 6096779 /usr/lib/ruby/1.8/i486-linux/etc.so puppetd 12942 root mem REG 254,0 105248 6096793 /usr/lib/ruby/1.8/i486-linux/syck.so puppetd 12942 root mem REG 254,0 15336 6096791 /usr/lib/ruby/1.8/i486-linux/stringio.so puppetd 12942 root mem REG 254,0 1232784 73908420 /lib/tls/i686/cmov/libc-2.3.6.so puppetd 12942 root mem REG 254,0 136368 73908424 /lib/tls/i686/cmov/libm-2.3.6.so puppetd 12942 root mem REG 254,0 18900 73908422 /lib/tls/i686/cmov/libcrypt-2.3.6.so puppetd 12942 root mem REG 254,0 8204 73908423 /lib/tls/i686/cmov/libdl-2.3.6.so puppetd 12942 root mem REG 254,0 86580 73908438 /lib/tls/i686/cmov/libpthread-2.3.6.so puppetd 12942 root mem REG 254,0 743536 6051476 /usr/lib/libruby1.8.so.1.8.4 puppetd 12942 root mem REG 254,0 9772 6096794 /usr/lib/ruby/1.8/i486-linux/syslog.so puppetd 12942 root mem REG 254,0 3880 6096780 /usr/lib/ruby/1.8/i486-linux/fcntl.so puppetd 12942 root mem REG 254,0 86404 73908240 /lib/ld-2.3.6.so puppetd 12942 root 0u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 1u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 2u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 3r FIFO 0,6 1430471 pipe puppetd 12942 root 4w FIFO 0,6 1430471 pipe puppetd 12942 root 5u unix 0xca183e00 1430473 socket puppetd 12942 root 6u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 7u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 8u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 9u IPv4 1430478 TCP *:8139 (LISTEN) puppetd 12942 root 10r FIFO 0,6 1430487 pipe puppetd 12958 root cwd DIR 254,0 4096 58687489 /root puppetd 12958 root rtd DIR 254,0 4096 2 / puppetd 12958 root txt REG 254,0 3240 6051478 /usr/bin/ruby1.8 puppetd 12958 root mem REG 0,0 0 [heap] (stat: No such file or directory) puppetd 12958 root mem REG 254,0 68804 73908464 /lib/tls/i686/cmov/libresolv-2.3.6.so puppetd 12958 root mem REG 254,0 14744 73908429 /lib/tls/i686/cmov/libnss_dns-2.3.6.so puppetd 12958 root mem REG 254,0 131224 6096784 /usr/lib/ruby/1.8/i486-linux/nkf.so puppetd 12958 root mem REG 254,0 77368 6047409 /usr/lib/libz.so.1.2.3 puppetd 12958 root mem REG 254,0 1224120 6062309 /usr/lib/i686/cmov/libcrypto.so.0.9.8 puppetd 12958 root mem REG 254,0 247488 6062310 /usr/lib/i686/cmov/libssl.so.0.9.8 puppetd 12958 root mem REG 254,0 11100 6096787 /usr/lib/ruby/1.8/i486-linux/racc/cparse.so puppetd 12958 root mem REG 254,0 213244 6097690 /usr/lib/ruby/1.8/i486-linux/openssl.so puppetd 12958 root mem REG 254,0 14968 6096775 /usr/lib/ruby/1.8/i486-linux/digest/sha1.so puppetd 12958 root mem REG 254,0 6544 6096771 /usr/lib/ruby/1.8/i486-linux/digest.so puppetd 12958 root mem REG 254,0 8052 6096773 /usr/lib/ruby/1.8/i486-linux/digest/md5.so puppetd 12958 root mem REG 254,0 37432 73908430 /lib/tls/i686/cmov/libnss_files-2.3.6.so puppetd 12958 root mem REG 254,0 14200 6096792 /usr/lib/ruby/1.8/i486-linux/strscan.so puppetd 12958 root mem REG 254,0 35416 6096790 /usr/lib/ruby/1.8/i486-linux/socket.so puppetd 12958 root mem REG 254,0 7604 6096779 /usr/lib/ruby/1.8/i486-linux/etc.so puppetd 12958 root mem REG 254,0 105248 6096793 /usr/lib/ruby/1.8/i486-linux/syck.so puppetd 12958 root mem REG 254,0 15336 6096791 /usr/lib/ruby/1.8/i486-linux/stringio.so puppetd 12958 root mem REG 254,0 1232784 73908420 /lib/tls/i686/cmov/libc-2.3.6.so puppetd 12958 root mem REG 254,0 136368 73908424 /lib/tls/i686/cmov/libm-2.3.6.so puppetd 12958 root mem REG 254,0 18900 73908422 /lib/tls/i686/cmov/libcrypt-2.3.6.so puppetd 12958 root mem REG 254,0 8204 73908423 /lib/tls/i686/cmov/libdl-2.3.6.so puppetd 12958 root mem REG 254,0 86580 73908438 /lib/tls/i686/cmov/libpthread-2.3.6.so puppetd 12958 root mem REG 254,0 743536 6051476 /usr/lib/libruby1.8.so.1.8.4 puppetd 12958 root mem REG 254,0 9772 6096794 /usr/lib/ruby/1.8/i486-linux/syslog.so puppetd 12958 root mem REG 254,0 3880 6096780 /usr/lib/ruby/1.8/i486-linux/fcntl.so puppetd 12958 root mem REG 254,0 86404 73908240 /lib/ld-2.3.6.so puppetd 12958 root 0u CHR 136,1 3 /dev/pts/1 puppetd 12958 root 1w FIFO 0,6 1430487 pipe puppetd 12958 root 2u CHR 136,1 3 /dev/pts/1 puppetd 12958 root 3r FIFO 0,6 1430471 pipe puppetd 12958 root 4w FIFO 0,6 1430471 pipe puppetd 12958 root 5u unix 0xca183e00 1430473 socket puppetd 12958 root 6u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12958 root 7u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12958 root 8u REG 254,0 102756 64143503 /var/log/puppet/http.log ________________________________ From: puppet-users-bounces@madstop.com on behalf of Blake Barnett Sent: Thu 1/03/2007 5:39 AM To: Puppet User Discussion Subject: Re: [Puppet-users] [Puppet-Users] Runaway child process using--listen On Feb 28, 2007, at 1:15 AM, Brendan Beveridge wrote:> Hey All, > When i try and run puppetd --debug --listen > i get a child process that maxes out cpu when it tries to call apt > or dpkg for checking packages:What port do you have puppetd listening on? Anything other than the default? If it''s below 1024 that might cause and issue... Do you have a valid namespaceauth.conf? Those are the two things I''ve had issues with when using the listen feature. -Blake _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Brendan Beveridge
2007-Feb-28 22:12 UTC
Re: [Puppet-Users] Runaway child process using--listen
An interesting update if change the puppetd port to something other than 8139, puppetd --listen works a little more it didnt seem to get stuck at dpkg/apt checks it ''seems'' to operate normally eg: puppetd --debug --listen --puppetport 8190 . . . debug: /puppetconfig/puppet/File[/var/lib/puppet/state/graphs]: Autorequiring File[/var/lib/puppet/state] debug: /puppetconfig/puppet/File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] debug: /puppetconfig/puppet/File[/var/lib/puppet/state/state.yaml]: Autorequiring File[/var/lib/puppet/state] debug: /puppetconfig/puppet/File[/var/lib/puppet/facts]: File does not exist debug: /puppetconfig/puppet/File[/var/lib/puppet/plugins]: File does not exist debug: Finishing transaction -614015496 with 0 changes although the child process is still sitting at 100% cpu usage if i then run a puppetrun --all --host localhost --puppetport 8190 . info: access[fileserver]: allowing server.domain.com access info: access[puppetmaster]: allowing server.domain.com access info: access[puppetrunner]: allowing server.domain.com access debug: Allowing citadel.server.domain.com(x.x.x.x) trusted access to puppetrunner.run notice: Could not trigger run; already running So at this point i thought that the apt/dpkg thing had disapeared but if i kill the child process we get the following: debug: //server/template-node-syd/ubuntu/Package[smartmontools]: Changing ensure debug: //server/template-node-syd/ubuntu/Package[smartmontools]: 1 change(s) debug: //server/template-node-syd/ubuntu/Package[smartmontools]/ensure: setting latest (currently absent) debug: package provider apt: Executing ''/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install smartmontools'' ________________________________ From: puppet-users-bounces@madstop.com on behalf of Brendan Beveridge Sent: Thu 1/03/2007 8:56 AM To: Puppet User Discussion Subject: RE: [Puppet-users] [Puppet-Users] Runaway child process using--listen im using the default port (ie not specifying it) as for namespaceauth.conf i use [fileserver] allow server.domain.com [puppetmaster] allow server.domain.com [puppetrunner] allow server.domain.com server = puppetmasterd and puppetd below is the output of open files from puppetd # lsof | grep puppetd puppetd 12942 root cwd DIR 254,0 4096 58687489 /root puppetd 12942 root rtd DIR 254,0 4096 2 / puppetd 12942 root txt REG 254,0 3240 6051478 /usr/bin/ruby1.8 puppetd 12942 root mem REG 0,0 0 [heap] (stat: No such file or directory) puppetd 12942 root mem REG 254,0 68804 73908464 /lib/tls/i686/cmov/libresolv-2.3.6.so puppetd 12942 root mem REG 254,0 14744 73908429 /lib/tls/i686/cmov/libnss_dns-2.3.6.so puppetd 12942 root mem REG 254,0 131224 6096784 /usr/lib/ruby/1.8/i486-linux/nkf.so puppetd 12942 root mem REG 254,0 77368 6047409 /usr/lib/libz.so.1.2.3 puppetd 12942 root mem REG 254,0 1224120 6062309 /usr/lib/i686/cmov/libcrypto.so.0.9.8 puppetd 12942 root mem REG 254,0 247488 6062310 /usr/lib/i686/cmov/libssl.so.0.9.8 puppetd 12942 root mem REG 254,0 11100 6096787 /usr/lib/ruby/1.8/i486-linux/racc/cparse.so puppetd 12942 root mem REG 254,0 213244 6097690 /usr/lib/ruby/1.8/i486-linux/openssl.so puppetd 12942 root mem REG 254,0 14968 6096775 /usr/lib/ruby/1.8/i486-linux/digest/sha1.so puppetd 12942 root mem REG 254,0 6544 6096771 /usr/lib/ruby/1.8/i486-linux/digest.so puppetd 12942 root mem REG 254,0 8052 6096773 /usr/lib/ruby/1.8/i486-linux/digest/md5.so puppetd 12942 root mem REG 254,0 37432 73908430 /lib/tls/i686/cmov/libnss_files-2.3.6.so puppetd 12942 root mem REG 254,0 14200 6096792 /usr/lib/ruby/1.8/i486-linux/strscan.so puppetd 12942 root mem REG 254,0 35416 6096790 /usr/lib/ruby/1.8/i486-linux/socket.so puppetd 12942 root mem REG 254,0 7604 6096779 /usr/lib/ruby/1.8/i486-linux/etc.so puppetd 12942 root mem REG 254,0 105248 6096793 /usr/lib/ruby/1.8/i486-linux/syck.so puppetd 12942 root mem REG 254,0 15336 6096791 /usr/lib/ruby/1.8/i486-linux/stringio.so puppetd 12942 root mem REG 254,0 1232784 73908420 /lib/tls/i686/cmov/libc-2.3.6.so puppetd 12942 root mem REG 254,0 136368 73908424 /lib/tls/i686/cmov/libm-2.3.6.so puppetd 12942 root mem REG 254,0 18900 73908422 /lib/tls/i686/cmov/libcrypt-2.3.6.so puppetd 12942 root mem REG 254,0 8204 73908423 /lib/tls/i686/cmov/libdl-2.3.6.so puppetd 12942 root mem REG 254,0 86580 73908438 /lib/tls/i686/cmov/libpthread-2.3.6.so puppetd 12942 root mem REG 254,0 743536 6051476 /usr/lib/libruby1.8.so.1.8.4 puppetd 12942 root mem REG 254,0 9772 6096794 /usr/lib/ruby/1.8/i486-linux/syslog.so puppetd 12942 root mem REG 254,0 3880 6096780 /usr/lib/ruby/1.8/i486-linux/fcntl.so puppetd 12942 root mem REG 254,0 86404 73908240 /lib/ld-2.3.6.so puppetd 12942 root 0u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 1u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 2u CHR 136,1 3 /dev/pts/1 puppetd 12942 root 3r FIFO 0,6 1430471 pipe puppetd 12942 root 4w FIFO 0,6 1430471 pipe puppetd 12942 root 5u unix 0xca183e00 1430473 socket puppetd 12942 root 6u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 7u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 8u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12942 root 9u IPv4 1430478 TCP *:8139 (LISTEN) puppetd 12942 root 10r FIFO 0,6 1430487 pipe puppetd 12958 root cwd DIR 254,0 4096 58687489 /root puppetd 12958 root rtd DIR 254,0 4096 2 / puppetd 12958 root txt REG 254,0 3240 6051478 /usr/bin/ruby1.8 puppetd 12958 root mem REG 0,0 0 [heap] (stat: No such file or directory) puppetd 12958 root mem REG 254,0 68804 73908464 /lib/tls/i686/cmov/libresolv-2.3.6.so puppetd 12958 root mem REG 254,0 14744 73908429 /lib/tls/i686/cmov/libnss_dns-2.3.6.so puppetd 12958 root mem REG 254,0 131224 6096784 /usr/lib/ruby/1.8/i486-linux/nkf.so puppetd 12958 root mem REG 254,0 77368 6047409 /usr/lib/libz.so.1.2.3 puppetd 12958 root mem REG 254,0 1224120 6062309 /usr/lib/i686/cmov/libcrypto.so.0.9.8 puppetd 12958 root mem REG 254,0 247488 6062310 /usr/lib/i686/cmov/libssl.so.0.9.8 puppetd 12958 root mem REG 254,0 11100 6096787 /usr/lib/ruby/1.8/i486-linux/racc/cparse.so puppetd 12958 root mem REG 254,0 213244 6097690 /usr/lib/ruby/1.8/i486-linux/openssl.so puppetd 12958 root mem REG 254,0 14968 6096775 /usr/lib/ruby/1.8/i486-linux/digest/sha1.so puppetd 12958 root mem REG 254,0 6544 6096771 /usr/lib/ruby/1.8/i486-linux/digest.so puppetd 12958 root mem REG 254,0 8052 6096773 /usr/lib/ruby/1.8/i486-linux/digest/md5.so puppetd 12958 root mem REG 254,0 37432 73908430 /lib/tls/i686/cmov/libnss_files-2.3.6.so puppetd 12958 root mem REG 254,0 14200 6096792 /usr/lib/ruby/1.8/i486-linux/strscan.so puppetd 12958 root mem REG 254,0 35416 6096790 /usr/lib/ruby/1.8/i486-linux/socket.so puppetd 12958 root mem REG 254,0 7604 6096779 /usr/lib/ruby/1.8/i486-linux/etc.so puppetd 12958 root mem REG 254,0 105248 6096793 /usr/lib/ruby/1.8/i486-linux/syck.so puppetd 12958 root mem REG 254,0 15336 6096791 /usr/lib/ruby/1.8/i486-linux/stringio.so puppetd 12958 root mem REG 254,0 1232784 73908420 /lib/tls/i686/cmov/libc-2.3.6.so puppetd 12958 root mem REG 254,0 136368 73908424 /lib/tls/i686/cmov/libm-2.3.6.so puppetd 12958 root mem REG 254,0 18900 73908422 /lib/tls/i686/cmov/libcrypt-2.3.6.so puppetd 12958 root mem REG 254,0 8204 73908423 /lib/tls/i686/cmov/libdl-2.3.6.so puppetd 12958 root mem REG 254,0 86580 73908438 /lib/tls/i686/cmov/libpthread-2.3.6.so puppetd 12958 root mem REG 254,0 743536 6051476 /usr/lib/libruby1.8.so.1.8.4 puppetd 12958 root mem REG 254,0 9772 6096794 /usr/lib/ruby/1.8/i486-linux/syslog.so puppetd 12958 root mem REG 254,0 3880 6096780 /usr/lib/ruby/1.8/i486-linux/fcntl.so puppetd 12958 root mem REG 254,0 86404 73908240 /lib/ld-2.3.6.so puppetd 12958 root 0u CHR 136,1 3 /dev/pts/1 puppetd 12958 root 1w FIFO 0,6 1430487 pipe puppetd 12958 root 2u CHR 136,1 3 /dev/pts/1 puppetd 12958 root 3r FIFO 0,6 1430471 pipe puppetd 12958 root 4w FIFO 0,6 1430471 pipe puppetd 12958 root 5u unix 0xca183e00 1430473 socket puppetd 12958 root 6u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12958 root 7u REG 254,0 102756 64143503 /var/log/puppet/http.log puppetd 12958 root 8u REG 254,0 102756 64143503 /var/log/puppet/http.log ________________________________ From: puppet-users-bounces@madstop.com on behalf of Blake Barnett Sent: Thu 1/03/2007 5:39 AM To: Puppet User Discussion Subject: Re: [Puppet-users] [Puppet-Users] Runaway child process using--listen On Feb 28, 2007, at 1:15 AM, Brendan Beveridge wrote:> Hey All, > When i try and run puppetd --debug --listen > i get a child process that maxes out cpu when it tries to call apt > or dpkg for checking packages:What port do you have puppetd listening on? Anything other than the default? If it''s below 1024 that might cause and issue... Do you have a valid namespaceauth.conf? Those are the two things I''ve had issues with when using the listen feature. -Blake _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Feb 28, 2007, at 4:12 PM, Brendan Beveridge wrote:> An interesting update > if change the puppetd port to something other than 8139, puppetd -- > listen works a little more > it didnt seem to get stuck at dpkg/apt checks > it ''seems'' to operate normallyThis would just be insane. I mean, it''s not like I *checked* on those ports, but if it behaved differently with one port vs. another, then dpkg and/or apt would need to have that port mean something specific to them.> [...] > So at this point i thought that the apt/dpkg thing had disapeared > but if i kill the child process we get the following: > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: > Changing ensure > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: 1 > change(s) > debug: //server/template-node-syd/ubuntu/Package[smartmontools]/ > ensure: setting latest (currently absent) > debug: package provider apt: Executing ''/usr/bin/apt-get -q -y -o > DPkg::Options::=--force-confold install smartmontools''Yeah, the processes are clearly behaving strangely with the socket open -- mostly likely, they''re thinking that they have a terminal or something silly like that and are waiting for input on it. Puppet currently attempts to close all sockets when it forks, but it''s clearly not succeeding entirely. Any advice on how to do this, including pointers to existing code that handles it, would be greatly appreciated. You can see how Puppet does it here: https://reductivelabs.com/trac/puppet/browser/trunk/lib/puppet/util.rb It''s all in the ''execute'' method (around line 305). -- To have a right to do a thing is not at all the same as to be right in doing it. -- G. K. Chesterton --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Experiencing the same problem and output (from truss) as reported above, for me it started when I added an exec task to my configuration which continues to point to what Luke stated above, that it is socket code related .. strange that before I added this latest task I was not seeing it on the 4 hosts I am testing / POC''ing puppet on. Happening on all 4 POC puppet client hosts I am using right now, hosts are a mix of Solaris 9 and Solaris 10. Not using the package task at all. Truss just shows the non-blocking I/O lines igprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 CPU slowly increases to near 100% over a few hours. Haven''t tried changing the listen port yet. Removing listen = true from puppetd.conf did fix the issue for 3 of the 4 clients, one still will not complete a configuration run even with the ''listen'' configuration change. Happy to provide more information if that is wanted, just let me know what to provide and where I should send it / enter it. - Max On 3/5/07, Luke Kanies <luke@madstop.com> wrote:> On Feb 28, 2007, at 4:12 PM, Brendan Beveridge wrote: > > > An interesting update > > if change the puppetd port to something other than 8139, puppetd -- > > listen works a little more > > it didnt seem to get stuck at dpkg/apt checks > > it ''seems'' to operate normally > > This would just be insane. I mean, it''s not like I *checked* on > those ports, but if it behaved differently with one port vs. another, > then dpkg and/or apt would need to have that port mean something > specific to them. > > > [...] > > So at this point i thought that the apt/dpkg thing had disapeared > > but if i kill the child process we get the following: > > > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: > > Changing ensure > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: 1 > > change(s) > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]/ > > ensure: setting latest (currently absent) > > debug: package provider apt: Executing ''/usr/bin/apt-get -q -y -o > > DPkg::Options::=--force-confold install smartmontools'' > > Yeah, the processes are clearly behaving strangely with the socket > open -- mostly likely, they''re thinking that they have a terminal or > something silly like that and are waiting for input on it. > > Puppet currently attempts to close all sockets when it forks, but > it''s clearly not succeeding entirely. Any advice on how to do this, > including pointers to existing code that handles it, would be greatly > appreciated. You can see how Puppet does it here: > > https://reductivelabs.com/trac/puppet/browser/trunk/lib/puppet/util.rb > > It''s all in the ''execute'' method (around line 305). > > -- > To have a right to do a thing is not at all the same as to be right > in doing it. -- G. K. Chesterton > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >
Whoops, turned out that on the 4th host I had a ''check puppet alive'' script that was passing the --listen switch to puppetd, overrriding my puppetd.conf update of setting listen = false After removing --listen now that instance is completing configuration runs as well. Just strange that it was working fine until I added two new configuration tasks in a new class, had been running for 2-3 weeks without this problem. The class in question has a file type and exec type in it. Not sure if that has anything to do with the issue or not, doesn''t match the other user''s experience with the failure being triggered by adding a package type to a server configuration. Regards, Max On 3/8/07, Max <perldork@webwizarddesign.com> wrote:> Experiencing the same problem and output (from truss) as reported > above, for me it started when I added an exec task to my configuration > which continues to point to what Luke stated above, that it is socket > code related .. strange that before I added this latest task I was not > seeing it on the 4 hosts I am testing / POC''ing puppet on. > > Happening on all 4 POC puppet client hosts I am using right now, hosts > are a mix of Solaris 9 and Solaris 10. Not using the package task at > all. > > Truss just shows the non-blocking I/O lines > > igprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > sigprocmask(SIG_SETMASK, 0x000D8178, 0x00000000) = 0 > > CPU slowly increases to near 100% over a few hours. > > Haven''t tried changing the listen port yet. > > Removing > > listen = true > > from puppetd.conf did fix the issue for 3 of the 4 clients, one still > will not complete a configuration run even with the ''listen'' > configuration change. > > Happy to provide more information if that is wanted, just let me know > what to provide and where I should send it / enter it. > > > - Max > > On 3/5/07, Luke Kanies <luke@madstop.com> wrote: > > On Feb 28, 2007, at 4:12 PM, Brendan Beveridge wrote: > > > > > An interesting update > > > if change the puppetd port to something other than 8139, puppetd -- > > > listen works a little more > > > it didnt seem to get stuck at dpkg/apt checks > > > it ''seems'' to operate normally > > > > This would just be insane. I mean, it''s not like I *checked* on > > those ports, but if it behaved differently with one port vs. another, > > then dpkg and/or apt would need to have that port mean something > > specific to them. > > > > > [...] > > > So at this point i thought that the apt/dpkg thing had disapeared > > > but if i kill the child process we get the following: > > > > > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: > > > Changing ensure > > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]: 1 > > > change(s) > > > debug: //server/template-node-syd/ubuntu/Package[smartmontools]/ > > > ensure: setting latest (currently absent) > > > debug: package provider apt: Executing ''/usr/bin/apt-get -q -y -o > > > DPkg::Options::=--force-confold install smartmontools'' > > > > Yeah, the processes are clearly behaving strangely with the socket > > open -- mostly likely, they''re thinking that they have a terminal or > > something silly like that and are waiting for input on it. > > > > Puppet currently attempts to close all sockets when it forks, but > > it''s clearly not succeeding entirely. Any advice on how to do this, > > including pointers to existing code that handles it, would be greatly > > appreciated. You can see how Puppet does it here: > > > > https://reductivelabs.com/trac/puppet/browser/trunk/lib/puppet/util.rb > > > > It''s all in the ''execute'' method (around line 305). > > > > -- > > To have a right to do a thing is not at all the same as to be right > > in doing it. -- G. K. Chesterton > > --------------------------------------------------------------------- > > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > > > _______________________________________________ > > Puppet-users mailing list > > Puppet-users@madstop.com > > https://mail.madstop.com/mailman/listinfo/puppet-users > > >
On Mar 8, 2007, at 2:54 PM, Max wrote:> Experiencing the same problem and output (from truss) as reported > above, for me it started when I added an exec task to my configuration > which continues to point to what Luke stated above, that it is socket > code related .. strange that before I added this latest task I was not > seeing it on the 4 hosts I am testing / POC''ing puppet on.What exec task did you add? Is it something I could run as a test? -- SCSI is *not* magic. There are fundamental technical reasons why it is necessary to sacrifice a young goat to your SCSI chain now and then. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
On Mar 8, 2007, at 2:59 PM, Max wrote:> After removing --listen now that instance is completing configuration > runs as well.*whew* -- If you would be a real seeker after truth, it is necessary that at least once in your life you doubt, as far as possible, all things. -- Rene Descartes --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com