I have my sudoers setup as per the puppet training class recommendation: file { "/etc/sudoers.check": content => template("etc/sudoers.erb"), mode => 440, notify => Exec[''sudo-check''], } exec { ''sudo-check'': path => ''/usr/sbin:/usr/bin'', command => ''visudo -c -f /etc/sudoers.check'', unless => "diff /etc/sudoers.check /etc/sudoers", require => File[''/etc/sudoers.check''], } file { "/etc/sudoers": ensure => present, mode => 440, require => [Exec[''sudo-check''],Package["sudo"]], source => ''/etc/sudoers.check'', } That works wonderfully on three out of four of our OS/arch combinations (Centos4/32-bit, Centos5/32-bit, Centos5/64-bit). However, on all of our Centos4/64-bit machines, we have inconsistent hangs, with the following error: err: //etc/Exec[sudo-check]/unless: Check "diff /etc/sudoers.check /etc/sudoers" exceeded timeout Running the diff by hand returns instantaneously, and it does not seem to matter (for the purposes of the hanging) if there is an actual change between sudoers.check and sudoers. I''ve run puppet using --debug, with nothing more helpful showing up. I''ve also run it under strace, and after pruning out all of the useless garbage, I''m left with not much. I put it up at http://www.nwind.net/puppet.strace if you want to look. The versions of ruby and puppet all match across all 4 platforms. Any idea where I should look next? David
On Thu, Jun 10, 2010 at 12:53 PM, <teancom@gmail.com> wrote:> I have my sudoers setup as per the puppet training class recommendation: > > file { "/etc/sudoers.check": > content => template("etc/sudoers.erb"), > mode => 440, > notify => Exec[''sudo-check''], > } > > exec { ''sudo-check'': > path => ''/usr/sbin:/usr/bin'', > command => ''visudo -c -f /etc/sudoers.check'', > unless => "diff /etc/sudoers.check /etc/sudoers", > require => File[''/etc/sudoers.check''], > } > > file { "/etc/sudoers": > ensure => present, > mode => 440, > require => [Exec[''sudo-check''],Package["sudo"]], > source => ''/etc/sudoers.check'', > } > > > That works wonderfully on three out of four of our OS/arch combinations > (Centos4/32-bit, Centos5/32-bit, Centos5/64-bit). However, on all of > our Centos4/64-bit machines, we have inconsistent hangs, with the > following error: > > err: //etc/Exec[sudo-check]/unless: Check "diff /etc/sudoers.check > /etc/sudoers" exceeded timeout >David, this sounds awfully similar to the problem we had (and resolved) in this thread: http://groups.google.com/group/puppet-users/browse_thread/thread/7efd79bcd807de4c/dc9f8e42082cd0aa?#dc9f8e42082cd0aa> > Running the diff by hand returns instantaneously, and it does not seem > to matter (for the purposes of the hanging) if there is an actual change > between sudoers.check and sudoers. I''ve run puppet using --debug, with > nothing more helpful showing up. I''ve also run it under strace, and > after pruning out all of the useless garbage, I''m left with not much. I > put it up at http://www.nwind.net/puppet.strace if you want to look. > > The versions of ruby and puppet all match across all 4 platforms. Any > idea where I should look next? > > David > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkwRQrcACgkQTKX6T9GeRTY2VgCcDonmQcJNu/Ij3OyqI3r/xSns > p+wAn21w8L/DuuV4cpTSWso5E+vUPLNi > =ohzu > -----END PGP SIGNATURE----- > >-- nigel -- 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.
HI David, On Thu, Jun 10, 2010 at 12:53 PM, <teancom@gmail.com> wrote:> I have my sudoers setup as per the puppet training class recommendation: > > file { "/etc/sudoers.check": > content => template("etc/sudoers.erb"), > mode => 440, > notify => Exec[''sudo-check''], > } > > exec { ''sudo-check'': > path => ''/usr/sbin:/usr/bin'', > command => ''visudo -c -f /etc/sudoers.check'', > unless => "diff /etc/sudoers.check /etc/sudoers", > require => File[''/etc/sudoers.check''], > } > > file { "/etc/sudoers": > ensure => present, > mode => 440, > require => [Exec[''sudo-check''],Package["sudo"]], > source => ''/etc/sudoers.check'', > } > > > That works wonderfully on three out of four of our OS/arch combinations > (Centos4/32-bit, Centos5/32-bit, Centos5/64-bit). However, on all of > our Centos4/64-bit machines, we have inconsistent hangs, with the > following error: > > err: //etc/Exec[sudo-check]/unless: Check "diff /etc/sudoers.check > /etc/sudoers" exceeded timeout > > Running the diff by hand returns instantaneously, and it does not seem > to matter (for the purposes of the hanging) if there is an actual change > between sudoers.check and sudoers. I''ve run puppet using --debug, with > nothing more helpful showing up. I''ve also run it under strace, and > after pruning out all of the useless garbage, I''m left with not much. I > put it up at http://www.nwind.net/puppet.strace if you want to look. > > The versions of ruby and puppet all match across all 4 platforms. Any > idea where I should look next? >Can you open a ticket, or see if one is already open? thanks, Dan> David > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkwRQrcACgkQTKX6T9GeRTY2VgCcDonmQcJNu/Ij3OyqI3r/xSns > p+wAn21w8L/DuuV4cpTSWso5E+vUPLNi > =ohzu > -----END PGP SIGNATURE----- > >-- 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.
teancom@gmail.com
2010-Jun-11 13:45 UTC
Re: [Puppet Users] exec hanging with CentOS4/64-bit
On Thu, Jun 10, 2010 at 02:55:04PM -0700, Nigel Kersten wrote:> On Thu, Jun 10, 2010 at 12:53 PM, <[1]teancom@gmail.com> wrote: > > I have my sudoers setup as per the puppet training class recommendation: > > � � � �file { "/etc/sudoers.check": > � � � � � � � �content => template("etc/sudoers.erb"), > � � � � � � � �mode => 440, > � � � � � � � �notify => Exec[''sudo-check''], > � � � �} > > � � � �exec { ''sudo-check'': > � � � � � � � �path => ''/usr/sbin:/usr/bin'', > � � � � � � � �command => ''visudo -c -f /etc/sudoers.check'', > � � � � � � � �unless => "diff /etc/sudoers.check /etc/sudoers", > � � � � � � � �require => File[''/etc/sudoers.check''], > � � � �} > > � � � �file { "/etc/sudoers": > � � � � � � � �ensure => present, > � � � � � � � �mode => 440, > � � � � � � � �require => [Exec[''sudo-check''],Package["sudo"]], > � � � � � � � �source => ''/etc/sudoers.check'', > � � � �} > > That works wonderfully on three out of four of our OS/arch combinations > (Centos4/32-bit, Centos5/32-bit, Centos5/64-bit). �However, on all of > our Centos4/64-bit machines, we have inconsistent hangs, with the > following error: > > err: //etc/Exec[sudo-check]/unless: Check "diff /etc/sudoers.check > /etc/sudoers" exceeded timeout > > David, this sounds awfully similar to the problem we had (and resolved) in > this thread: > [2]http://groups.google.com/group/puppet-users/browse_thread/thread/7efd79bcd807de4c/dc9f8e42082cd0aa?#dc9f8e42082cd0aa > �That does appear to be exactly what we''re seeing. I''ll recompile ruby with those patches - and thanks! David