On Tue, Jul 23, 2013 at 10:57 PM, Josh D <joshuadavid...@gmail.com> wrote:

> I installed Cygwin on some Windows 7 x64 client nodes (v3.2.3) and was in
> the process of removing it.  Because I cannot modify CIFS/SAMBA shares or
> change the puppet service to run as a domain user, I'm basically reduced to
> getting the installers for each package on the machine prior to installing
> them.  I was just using simple file types for this.  Therefore, as part of
> the uninstallation of Cygwin, I was trying to remove the installer as well.
>  The file is quite large, clocking in close to 2GB.  Is there anything i
> can do to increase the amount of memory available to the agent or somehow
> avoid this error?
>
>
> Error: /Stage[main]/Win7_user/File[CygwinInstaller1]/ensure: change from
> file to absent failed: failed to allocate memory
> Error: Could not run: failed to allocate memory
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/file_bucket/dipper.rb:35:in `binread'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/file_bucket/dipper.rb:35:in `backup'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/util/backups.rb:84:in
> `backup_file_with_filebucket'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/util/backups.rb:28:in
> `perform_backup_with_bucket'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/util/backups.rb:15:in `perform_backup'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/type/file.rb:817:in`backup_existing'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/type/file.rb:628:in`remove_existing'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/type/file/ensure.rb:160:in `sync'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:114:in
> `apply_parameter'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:56:in
> `perform_changes'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:139:in
> `evaluate'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:48:in `apply'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:83:in `eval_resource'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:103:in `block (2 levels) in
> evaluate'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:351:in
> `block in thinmark'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:350:in
> `thinmark'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:103:in `block in evaluate'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:382:in `traverse'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/transaction.rb:98:in `evaluate'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:146:in `apply'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/configurer.rb:122:in `block in apply_catalog'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:179:in
> `block in benchmark'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:178:in
> `benchmark'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/configurer.rb:121:in `apply_catalog'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/configurer.rb:179:in `run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in
> `block (5 levels) in run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in
> `block (4 levels) in run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/sys/ruby/lib/ruby/1.9.1/sync.rb:227:in `sync_synchronize'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in
> `block (3 levels) in run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/agent.rb:119:in `with_client'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in
> `block (2 levels) in run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:84:in
> `run_in_fork'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:41:in
> `block in run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:179:in `call'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:39:in
> `run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application/agent.rb:353:in `onetime'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application/agent.rb:327:in `run_command'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels) in
> run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:456:in `plugin_hook'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:504:in
> `exit_on_fail'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/application.rb:364:in `run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/util/command_line.rb:132:in `run'
> C:/Program Files (x86)/Puppet
> Labs/Puppet/puppet/lib/puppet/util/command_line.rb:86:in `execute'
> C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

Puppet will automatically backup any file it overwrites/removes. See the
backup parameter of the file resource[1]. You'll probably want to set
`backup => false` globally and then enable where it makes sense. To be
honest, I'm not sure why backups are enabled by default like that.

Another issue is that puppet reads the entire file into memory and then
tries to save it, as opposed to streaming the file[2]. This is a bug[3],
which has not yet been fixed.

Josh

[1] http://docs.puppetlabs.com/references/latest/type.html#file
[2]
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_bucket/dipper.rb#L35
[3] http://projects.puppetlabs.com/issues/13097
-- 
Josh Cooper
Developer, Puppet Labs

*Join us at PuppetConf 2013, August 22-23 in San Francisco - *
http://bit.ly/pupconf13*
**Register now and take advantage of the Final Countdown discount - save
15%!*

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to