Issue #8229 has been updated by Josh Cooper.

Assignee changed from Andrew Parker to Josh Cooper

So there are a few issues here:

* There are some places where we read the entire file into memory, especially 
when we write a file into the file bucket and ensure it matches the checksum 
that was specified.

* The `file_bucket` indirected type supports several serialization formats. 
With a webrick setup, I see it trying 4 formats, only the last one `raw` works. 
Depending on the master load, size of the file, the request may fail, the pson 
regexp buffer may be exceeded. All of this is incredibly slow and dumb.

<pre>
Debug: file_bucket_file supports formats: pson b64_zlib_yaml yaml raw
Debug: file_bucket_file supports formats: pson b64_zlib_yaml yaml raw
Debug: file_bucket_file supports formats: pson b64_zlib_yaml yaml raw
Debug: file_bucket_file supports formats: pson b64_zlib_yaml yaml raw
Info: /Stage[main]//File[/tmp/foo]: Filebucketed /tmp/foo to main with sum 
eb9117579bf4338c92c5de6a1144c3a5
Notice: /Stage[main]//File[/tmp/foo]/content: content changed 
'{md5}eb9117579bf4338c92c5de6a1144c3a5' to 
'{md5}c4ca4238a0b923820dcc509a6f75849b'
</pre>

* When the agent sends a file to the master to backup, the master 
unintentionally sends the same `instance` back. Yes, the master echos the file 
back to the agent, and the agent ignores it!

* There is a bug in the `file` face such that if you do `puppet file find` it 
uses `puts` to write out the response, thereby corrupting the returned file.

The `file_bucket` needs to be using the `raw` serialization format, similar to 
what is done for `file_content`.

----------------------------------------
Bug #8229: File bucket and Puppet  File resource: fails with "regexp buffer 
overflow" when backing up binary file
https://projects.puppetlabs.com/issues/8229#change-96962

* Author: Jeff McCune
* Status: Accepted
* Priority: High
* Assignee: Josh Cooper
* Category: filebucket
* Target version: 
* Affected Puppet version: 2.6.0
* Keywords: puppet inspect upload archive customer
* Branch: 
----------------------------------------
# Overview #

When uploading files using `puppet inspect` I often get this on the managed 
node side of the equation:

<pre>
/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired 
(Timeout::Error)
        from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
        from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
        from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
        from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
        from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new'
        from /usr/lib/ruby/1.8/net/http.rb:1051:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:1037:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
        from /usr/lib/ruby/1.8/net/http.rb:1035:in `request'
        from /usr/lib/ruby/1.8/net/http.rb:857:in `put'
        from /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:107:in `save'
        from 
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:264:in `save'
        from /usr/lib/ruby/site_ruby/1.8/puppet/indirector.rb:68:in `save'
        from /usr/lib/ruby/site_ruby/1.8/puppet/file_bucket/dipper.rb:43:in 
`backup'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/inspect.rb:157:in 
`run_command'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/inspect.rb:117:in 
`each'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/inspect.rb:117:in 
`run_command'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:193:in `benchmark'
        from /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:192:in `benchmark'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application/inspect.rb:101:in 
`run_command'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:420:in `hook'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:411:in 
`exit_on_fail'
        from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:305:in `run'
        from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:62:in 
`execute'
        from /usr/bin/puppet:4
</pre>

On the master side, I saw this error message but did not have trace enabled:

<pre>
err: Could not intern from pson: regexp buffer overflow
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

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

Reply via email to