Hi Matt,

Thanks for your answer. I will try your module, it seems better that mine :)
But I don't think that the module is the problem, because it works fine on 
all the node. Just, I don't know why, it suddenly fail, and works again 
after reboot.

Anthony

Le jeudi 3 janvier 2013 16:27:40 UTC+1, Matt Zagrabelny a écrit :
>
> Note: I didn't follow this thread from the beginning, so this comment 
> might be out of place. 
>
> On Thu, Jan 3, 2013 at 8:59 AM, Anthony BRODARD 
> <brodard...@gmail.com <javascript:>> wrote: 
> > Hi list, 
> > 
> > I've writed this module to deploy the public key of our debian 
> repository : 
> > 
> >> file 
> >> { 
> >>     "/etc/apt/repos-public.key": 
> >>         ensure  => present, 
> >>         mode => 440, 
> >>         owner => root, 
> >>         group => root, 
> >>         source => "puppet://puppet/apt/repos-public.key", 
> >>         notify => Exec[install-key]; 
> >> } 
> >> exec 
> >> { 
> >>     "install-key": 
> >>         command => "/usr/bin/apt-key add /etc/apt/repos-public.key && 
> >> /usr/bin/apt-get update", 
> >>         unless => "/usr/bin/apt-key list | /bin/grep 'Private Repos'", 
> >> } 
> > 
> > 
> > So, it works fine, the key is correctly installed on all the nodes, but, 
> > randomly, during the compilation, the command isn't executed and lock 
> the 
> > system during the timeout period (300s). It appear on all puppet 
> compilation 
> > of the node, and the only way to resolve it is to reboot. This issue 
> affect 
> > the nodes randomly, with an average of 1/month. 
> > 
> > I've launch a manual compilation on a node actually impacted, with debug 
> > option, and I only have this error : 
> > 
> >> debug: /Stage[main]/Apt/Exec[install-key]: Executing check 
> >> '/usr/bin/apt-key list | /bin/grep 'Private Repos'' 
> >> debug: Executing '/usr/bin/apt-key list | /bin/grep 'Private Repos'' 
> >> err: /Stage[main]/Apt/Exec[install-key]/unless: Check "/usr/bin/apt-key 
> >> list | /bin/grep 'Private Repos'" exceeded timeout 
> > 
> > 
> > If I try to exec the apt-key list command, it will works correctly : 
> > 
> >> [toad2]~ # time /usr/bin/apt-key list | /bin/grep 'Private Repos' 
> >> uid                  Private Repos (priv) <support@tld> 
> >> 
> >> real 0.023      user 0.000      sys 0.000       pcpu 0.00 
> > 
> > 
> > I don't see any error in the system log files. 
> > Have you any idea about this issue ? 
> > 
> > For information, puppetmaster and the clients runs on Debian Squeeze. 
> Puppet 
> > version is 2.6.2 . 
>
> For our Squeeze installs, I perform the following: 
>
> class apt::config { 
>     file { "/etc/apt/sources.list.d/umd.list": 
>         source  => 
> "puppet:///modules/apt/etc/apt/sources.list.d/umd.list", 
>     } 
>     file { "/etc/apt/trusted.gpg.d/umd.gpg": 
>         source  => "puppet:///modules/apt/etc/apt/trusted.gpg.d/umd.gpg", 
>     } 
>     exec { "update_apt_for_new_sources": 
>         command     => "apt-get -q=2 update", 
>         refreshonly => true, 
>         subscribe   => [ 
>             File["/etc/apt/sources.list.d/umd.list"], 
>             File["/etc/apt/trusted.gpg.d/umd.gpg"], 
>         ], 
>     } 
> } 
>
> Perhaps that will help. 
>
> -mz 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/S2dc4TXrQTMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to