[Pkg-puppet-devel] Bug#832536: puppet-master - no upgrade path from 3.7

Apollon Oikonomopoulos apoikos at debian.org
Wed Jan 11 11:34:42 UTC 2017


Hi James!

On 11:15 Wed 11 Jan     , James Cowgill wrote:
> Hi,
> 
> If it helps, I've been running this glorious hack on my puppet server
> for some time and it seems to work OK. I don't know how easy it would
> be to convert it to something which can be distributed by Debian though.
> 
> This hard-codes the environment to "production" but that could be
> worked around.
> 
> I mostly wrote it based on the contents of:
> https://github.com/puppetlabs/puppetserver/tree/master/src/clj/puppetlabs/services/legacy_routes
> 
> # JCOWGILL: Hack to get puppet v3 agents working with puppet v4
> #  - can be removed once all puppet clients have upgraded to stretch (which has puppet v4)
> RewriteEngine On
> #  Certificate API
> RewriteRule ^/production/certificate(.*)/? /puppet-ca/v1/certificate$1?environment=production [PT,L,QSA]
> #  file_bucket_file, GET should always return text/plain to 3.0 clients
> RewriteCond %{REQUEST_METHOD} =GET
> RewriteRule ^/production/file_bucket_file/(.*)/? - [env=fbf_get:1]
> RewriteCond %{REQUEST_METHOD} =GET
> RewriteRule ^/production/file_content/(.*)/? - [env=fbf_get:1]
> Header set Content-type text/plain env=fbf_get
> RequestHeader set Accept binary env=fbf_get
> #  file_bucket_file, POST/PUT should use Content-Type: application/octet-stream
> RewriteCond %{REQUEST_METHOD} =POST [OR]
> RewriteCond %{REQUEST_METHOD} =PUT
> RewriteRule ^/production/file_bucket_file/(.*)/? - [env=fbf_post:1]
> RequestHeader set Content-Type application/octet-stream env=fbf_post
> #  Main HTTP API
> RewriteRule ^/production/(.*)/? /puppet/v3/$1?environment=production [PT,L,QSA]
> # JCOWGILL: end hack

Thanks for confirming this! Fixing the environment shouldn't be hard.

I was also thinking of fixing this at the Apache level for 
puppetmaster-passenger only (at least initially) and it's good to see 
proof that it works.

Thanks,
Apollon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-puppet-devel/attachments/20170111/ebfee766/attachment.sig>


More information about the Pkg-puppet-devel mailing list