Issue #18255 has been updated by eric sorenson.

Category set to fileserving
Status changed from Unreviewed to Investigating
Assignee set to Andrew Parker

Does this seem feasible Andy? seems like it'd require some additional handling 
in `lib/puppet/network/http/connection.rb` which would affect **every** http 
client connection, not just file serving, but I don't think that's necessarily 
a bad thing; handling redirects properly makes us a more robust network citizen.
----------------------------------------
Feature #18255: accept 301 response from fileserver
https://projects.puppetlabs.com/issues/18255#change-79444

Author: Dmitriy Novitskiy
Status: Investigating
Priority: Normal
Assignee: Andrew Parker
Category: fileserving
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


We use nginx as the main server to deliver files with the help of puppet. We 
use several data centers (DCs) and we would like to deliver big files via the 
file-server in every DC. 
Example:

    location /production/file_content/files/vz_files/vz/template/ {
    types { }
    default_type application/x-raw;
    if ($server = 1) {
    rewrite (.*) http://otherdc/$uri break;
    }
    alias /var/lib/puppet/files/vz_files/vz/template/;
    }

But in this case puppet agent gets an error:

    Thu Dec 20 16:25:09 +0400 2012 
/Stage[main]/Vztemplates/File[/vz/template/cache/centos-5-i386.tar.gz]/content 
(err): change from {md5}6d70dd32f00adb5b82453b8edb35041a to 
{md5}312caca43c9df99e9fbb6bd4a49ad33c failed: Error 301 on SERVER: <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>nginx/0.8.55</center>
    </body>
    </html>

The headers:
    HTTP request sent, awaiting response...
    HTTP/1.1 301 Moved Permanently
    Server: nginx/0.8.55
    Date: Thu, 20 Dec 2012 13:38:00 GMT
    Content-Type: text/html
    Content-Length: 161
    Connection: keep-alive
    Location: 
http://otherdc//production/file_content/files/vz_files/vz/template/centos-5-i386.tar.gz
    Location: 
http://otherdc//production/file_content/files/vz_files/vz/template/centos-5-i386.tar.gz
 [following]
    --2012-12-20 17:38:00--  
http://otherdc//production/file_content/files/vz_files/vz/template/centos-5-i386.tar.gz
    Connecting to otherdc:80... connected.
    HTTP request sent, awaiting response...
    HTTP/1.1 200 OK
    Server: nginx/0.8.55
    Date: Thu, 20 Dec 2012 13:38:01 GMT
    Content-Type: application/x-raw
    Content-Length: 389160454
    Last-Modified: Thu, 20 Dec 2012 10:05:07 GMT
    Connection: close
    Accept-Ranges: bytes
    Length: 389160454 (371M) [application/x-raw]
    Saving to: `centos-5-i386.tar.gz'


-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to