Hi Folks I''m a relative newbie to puppet (been playing about a month)... I am trying to push out a directory containing a bunch of files to a number of machines and thought I could do this using the recurse attribute: file { "/home/snort/Rules/raw": mode => "750", owner => snort, group => snort, source => ''/home/sensors/Rules/raw'', recurse => true, ensure => present; } Yeah -- pushing snort rule tarballs to sensors... however this results in: err: /Stage[main]/Snort/File[/home/snort/Rules/raw]: Failed to generate additional resources using ''eval_generate'': undefined method `relative_path'' for nil:NilClass err: /Stage[main]/Snort/File[/home/snort/Rules/raw]: Failed to retrieve current state of resource: Could not retrieve information from source(s) /home/sensors/Rules/raw at /etc/puppet/modules/snort/manifests/init.pp:32 So am I going about this the wrong way or have I got some detail wrong. (note to developers: please ''rescue'' this error and provide something meaningful to the user ;) Russell -- 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.
Eric Sorenson
2010-Nov-18 03:06 UTC
Re: [Puppet Users] trying to push a whole directory...
On Nov 17, 2010, at 2:48 PM, Russell Fulton wrote:> source => ''/home/sensors/Rules/raw'',This needs to be a puppet:// url which matches up to an appropriate ''mount'' in your server''s /etc/puppet/fileserver.conf: # fileserver.conf [sensors] path = /home/sensors allow = * # end fileserver.conf # in your manifest file { "/home/snort/Rules/raw": mode => "750", owner => snort, group => snort, source => ''puppet:///sensors/Rules/raw'', recurse => remote, ensure => present; } # end manifest Note I also changed your ''recurse => true'' to ''recurse => remote'', a sadly under-documented feature which eases recursive copies by recursing the source directory to build a list of files that need checksumming, not the target. (see http://projects.puppetlabs.com/issues/show/1469 for the backstory) - Eric Sorenson - N37 17.255 W121 55.738 - http://twitter.com/ahpook - -- 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.
On Nov 17, 2010, at 2:48 PM, Russell Fulton wrote:> > (note to developers: please ''rescue'' this error and provide something meaningful to the user ;)Someone else posted a fix. On the subject of the error itself, this bug is known and fixed in 2.6.x and 0.25.5. If you want more info, look at http://projects.puppetlabs.com/issues/3101 -- 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, On 18/11/10 03:06, Eric Sorenson wrote:> Note I also changed your ''recurse => true'' to ''recurse => remote'', a sadly > under-documented feature which eases recursive copies by recursing the source > directory to build a list of files that need checksumming, not the target. > (see http://projects.puppetlabs.com/issues/show/1469 for the backstory)Just to abstract out the bit which is useful to anyone wanting to try this, this describes what was implemented, right? http://projects.puppetlabs.com/issues/1469#note-6> If we want to go this way, the following would IMHO be preferable: > > ... recurse => , > recurselimit => [0-9]+ > > Where: > > recurse parameter: > both => old behavior > remote => new behavior (recurse on master, prune on local) > true => same as both > false => default (ie no-recurse) > [0-9]+ => both, but limit recursion, give a warning to user that > this syntax is deprecated and that they should > move to recurselimit. > > recurselimit parameter: > [0-9]+ => recursion limit, usable with both (or true) and remote. > If recurse=false it is ignored. If recurse is a number, > then an error should be raised. > > This way, we preserve the old behavior by default and we warn people > that the syntax is deprecated.Now, it says it''s fixed in 25.0? ("Affected version" means the broken version, correct?) Presumably this is the server version? (Be nice if that could be made explicit in general.) My question is then, given that version on the puppetmaster, what version *clients* will this work with? For example, I have Ubuntu Lucid with puppetmaster v25.4 and a Debian Lenny puppet client I''m testing, with v24.5. N -- 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.
Nigel Kersten
2010-Nov-18 20:44 UTC
Re: [Puppet Users] trying to push a whole directory...
On Thu, Nov 18, 2010 at 1:45 AM, Nick <oinksocket@letterboxes.org> wrote:> Hi, > > On 18/11/10 03:06, Eric Sorenson wrote: >> Note I also changed your ''recurse => true'' to ''recurse => remote'', a sadly >> under-documented feature which eases recursive copies by recursing the source >> directory to build a list of files that need checksumming, not the target. >> (see http://projects.puppetlabs.com/issues/show/1469 for the backstory) > > Just to abstract out the bit which is useful to anyone wanting to try this, this > describes what was implemented, right? > > http://projects.puppetlabs.com/issues/1469#note-6 >> If we want to go this way, the following would IMHO be preferable: >> >> ... recurse => , >> recurselimit => [0-9]+ >> >> Where: >> >> recurse parameter: >> both => old behavior >> remote => new behavior (recurse on master, prune on local) >> true => same as both >> false => default (ie no-recurse) >> [0-9]+ => both, but limit recursion, give a warning to user that >> this syntax is deprecated and that they should >> move to recurselimit. >> >> recurselimit parameter: >> [0-9]+ => recursion limit, usable with both (or true) and remote. >> If recurse=false it is ignored. If recurse is a number, >> then an error should be raised. >> >> This way, we preserve the old behavior by default and we warn people >> that the syntax is deprecated. > > > Now, it says it''s fixed in 25.0? ("Affected version" means the broken version, > correct?) > > Presumably this is the server version? (Be nice if that could be made explicit > in general.) > > My question is then, given that version on the puppetmaster, what version > *clients* will this work with? For example, I have Ubuntu Lucid with > puppetmaster v25.4 and a Debian Lenny puppet client I''m testing, with v24.5.This is a really good question. We need to more clearly specify required client and server versions for new functionality. I''m pretty sure you''re going to need 0.25.x on both the server and client to get this functionality. -- Nigel Kersten - Puppet Labs - http://www.puppetlabs.com -- 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.