exec hanging with CentOS4/64-bit

8 views
Skip to first unread message

tea...@gmail.com

unread,
Jun 10, 2010, 3:53:28 PM6/10/10
to puppet...@googlegroups.com
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

signature.asc

Nigel Kersten

unread,
Jun 10, 2010, 5:55:04 PM6/10/10
to puppet...@googlegroups.com
On Thu, Jun 10, 2010 at 12:53 PM, <tea...@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:



 

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

Dan Bode

unread,
Jun 10, 2010, 7:01:02 PM6/10/10
to puppet...@googlegroups.com
HI David,

On Thu, Jun 10, 2010 at 12:53 PM, <tea...@gmail.com> wrote:

Can you open a ticket, or see if one is already open?

thanks,

Dan
 

tea...@gmail.com

unread,
Jun 11, 2010, 9:45:12 AM6/11/10
to puppet...@googlegroups.com
On Thu, Jun 10, 2010 at 02:55:04PM -0700, Nigel Kersten wrote:

> On Thu, Jun 10, 2010 at 12:53 PM, <[1]tea...@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

signature.asc
Reply all
Reply to author
Forward
0 new messages