On 28/02/11 12:23, Thomas Rasmussen wrote:
> hey
>
> OK, now I have tried to do it via rsync and it seems to be working...
> but the recurse bug is apparently very serious... I now have a
> manifest that does:
>
>     file { "/pack/mysql-5.5.9":
>       ensure => directory,
>       recurse => true,
>       force => true,
>       owner => "root",
>       group => "root",
>       require => Exec[rsync_mysql_install],
>     }
>
> This takes about the same time as if I was copying (I need to be sure
> of permissions of rsync'ed files). Is the recurse feature really that
> bad?

It'll still be reading and md5summing all those files multiple times
even though there's nothing to compare against. Try setting "checksum =>
none" to disable it.

If it's still really slow, run "puppet agent --test" or "puppet apply"
in strace to see what's taking so long. Search for known file names.

Dan

> Thomas
>
> On Feb 28, 11:28 am, Daniel Piddock <dgp-g...@corefiling.co.uk> wrote:
>> On 28/02/11 10:19, Thomas Rasmussen wrote:
>>
>>> Hi
>>> My network is 100Mbit (approximately, but through a VPN so not that
>>> fast) with latency around 2ms (right now our test-setup is running on
>>> servers right beside each other :-))
>>> I have tried to switch to passenger and this does not seem that much
>>> faster, still uses very very long time to run. I now have tried to
>>> copy the tar-ball and unpackaged this to the target directory and run
>>> puppet again, now it just wants to correct permissions (which is OK
>>> because they are wrong in the tar-ball) and this takes 2-5 seconds per
>>> file!) which is pretty much unusable (I still have the manifest to
>>> copy from the master to clients)
>> Directory recursion is horribly inefficient and quite broken. It's
>> md5summing every source and target file twice. It then md5sums the
>> target again at the end to ensure it did it right.
>>
>> Seehttps://projects.puppetlabs.com/issues/5650, 6003 and 6004.
>>
>>> I'm not that happy about making a solution like yours, it might be the
>>> solution we choose but I really don't see this as the best one. I'd
>>> rather have puppet serve the files on its own, but it seems as though
>>> it is not feasible?
>> If you *really* want puppet to manage the files you have two solutions:
>> * Put up with the horrible delay and brokenness until it's eventually fixed.
>> * List each file and subdirectory in your manifest.
>>
>> Personally, I went with rsync run from a script with a schedule of
>> daily, similar to Patrick.
>> exec { '/usr/local/scripts/installMaps.sh':
>>     schedule => daily,
>>
>>
>>
>> }

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to