|
If you backup a file to a local filebucket, and list its contents you'll see (once
PUP-5606
is fixed):
$ bx puppet filebucket list -l
|
549c165e620be535764e782eb1e4e83f 2017-11-16 15:27:39 /private/tmp/foo
|
But if the same file is backed up a remote filebucket hosted by puppetserver, and you list its contents, the leading slash is lost:
[root@ymjl00zn52sxdxm ~]# /opt/puppetlabs/puppet/bin/puppet filebucket list --bucket /opt/puppetlabs/server/data/puppetserver/bucket/
|
549c165e620be535764e782eb1e4e83f 2017-11-16 17:12:06 private/tmp/foo
|
The client appears to be sending the correct HTTP request, note the double slash:
Info: Computing checksum on file /tmp/foo
|
<- "HEAD /puppet/v3/file_bucket_file/md5/549c165e620be535764e782eb1e4e83f//private/tmp/foo?environment=production& HTTP/1.1\r\nAccept: application/octet-stream\r\nX-Puppet-Version: 5.3.3\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Puppet/5.3.3 Ruby/2.4.1-p111 (x86_64-darwin15)\r\nHost: ymjl00zn52sxdxm.delivery.puppetlabs.net:8140\r\n\r\n"
|
-> "HTTP/1.1 404 Not Found\r\n"
|
-> "Date: Fri, 17 Nov 2017 01:12:06 GMT\r\n"
|
-> "Content-Type: application/json;charset=utf-8\r\n"
|
-> "X-Puppet-Version: 5.3.0\r\n"
|
-> "Content-Length: 143\r\n"
|
-> "Server: Jetty(9.4.z-SNAPSHOT)\r\n"
|
-> "\r\n"
|
Conn keep-alive
|
<- "PUT /puppet/v3/file_bucket_file/md5/549c165e620be535764e782eb1e4e83f//private/tmp/foo?environment=production& HTTP/1.1\r\nAccept: application/octet-stream\r\nX-Puppet-Version: 5.3.3\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nContent-Type: application/octet-stream\r\nUser-Agent: Puppet/5.3.3 Ruby/2.4.1-p111 (x86_64-darwin15)\r\nHost: ymjl00zn52sxdxm.delivery.puppetlabs.net:8140\r\nContent-Length: 38\r\n\r\n"
|
<- "Tsdfadsasdfasdhis is the old content\n\n"
|
-> "HTTP/1.1 200 OK\r\n"
|
-> "Date: Fri, 17 Nov 2017 01:12:06 GMT\r\n"
|
-> "Content-Type: application/octet-stream;charset=iso-8859-1\r\n"
|
-> "X-Puppet-Version: 5.3.0\r\n"
|
-> "Content-Length: 0\r\n"
|
-> "Server: Jetty(9.4.z-SNAPSHOT)\r\n"
|
-> "\r\n"
|
reading 0 bytes...
|
-> ""
|
Webrick has the same problem too.
|