[SERVER-2118] Catalogs are not gzipped Created: 2018/02/07  Updated: 2018/03/30  Resolved: 2018/02/20

Status: Closed
Project: Puppet Server
Component/s: None
Affects Version/s: SERVER 5.1.4
Fix Version/s: SERVER 5.3.0

Type: Bug Priority: Normal
Reporter: Dylan Ratcliffe Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File debug.txt    
Issue Links:
relates to PUP-7251 gzip decompression mangles utf-8 cont... Closed
relates to TK-429 gzip encoding errantly disabled in tk... Resolved
Template: PUP Bug Template
Team: Froyo
Method Found: Needs Assessment
Release Notes: Bug Fix
Release Notes Summary: Catalog response bodies are now gzipped when requested, like all other response bodies. The fix for this bug also entails that the response bodies for _all_ POST requests can now be gzipped when requested.
QA Risk Assessment: Needs Assessment


Puppet Version: 5.3.3
Puppet Server Version: 5.1.4
OS Name/Version: Centos 7

Puppetserver does not gzip catalogs, it should gzip everything.

Desired Behavior: Everything is gzipped over the wire

Actual Behavior: Everything but the catalog is gzipped over the wire

Attached is the output of puppet agent -t --http_debug


Comment by Josh Cooper [ 2018/02/07 ]

ping Past Haus, maybe a jetty/tk/server regression?

Comment by Josh Cooper [ 2018/02/08 ]

I was able to reproduce and I'm thinking it's due to the agent POST'ing with content-type application/x-www-form-urlencoded. Moving to server ticket.

<- "POST /puppet/v3/catalog/localhost?environment=foobar HTTP/1.1\r\nAccept: application/json, text/pson\r\nX-Puppet-Version: 5.3.5\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Puppet/5.3.5 Ruby/2.1.9-p490 (x86_64-darwin15.0)\r\nHost: x1ajtt51b1e9dw5.delivery.puppetlabs.net:8140\r\nContent-Length: 8020\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n"
-> "HTTP/1.1 200 OK\r\n"
-> "Date: Thu, 08 Feb 2018 00:46:19 GMT\r\n"
-> "Content-Type: application/json;charset=utf-8\r\n"
-> "X-Puppet-Version: 5.3.5\r\n"
-> "Transfer-Encoding: chunked\r\n"
-> "Server: Jetty(9.4.z-SNAPSHOT)\r\n"
-> "\r\n"
-> "8000\r\n"
reading 32768 bytes...

Comment by Maggie Dreyer [ 2018/02/08 ]

We were able to track this down to a change in jetty, where POST request responses are excluded from gzipping by default. We need configure jetty in tk-jetty9 to make sure these also get gzipped.

Comment by Maggie Dreyer [ 2018/02/08 ]

We should send out an email to make sure that other teams know about this change going into tk-jetty9.

Comment by Lizzi Lindboe [ 2018/03/12 ]

Maggie Dreyer Do you think this issue deserves some release notes?

Comment by Maggie Dreyer [ 2018/03/12 ]

Yeah I'll throw something on here.

Generated at Wed Apr 01 06:54:07 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.