Jira (PUP-10359) Agents no longer accept rich data in catalogs

12 views
Skip to first unread message

Josh Cooper (Jira)

unread,
Mar 5, 2020, 6:33:03 PM3/5/20
to puppe...@googlegroups.com
Josh Cooper moved an issue
 
Puppet / Bug PUP-10359
Agents no longer accept rich data in catalogs
Change By: Josh Cooper
Fix Version/s: PUP 6.14.0
Fix Version/s: PUP 6.14.0
Key: PE PUP - 28561 10359
Project: Puppet Enterprise [Internal]
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 5, 2020, 6:36:03 PM3/5/20
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Josh Cooper
Change By: Josh Cooper
Assignee: Josh Cooper

Josh Cooper (Jira)

unread,
Mar 5, 2020, 6:36:04 PM3/5/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Sprint: Platform Core KANBAN

Josh Cooper (Jira)

unread,
Mar 5, 2020, 7:48:02 PM3/5/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10359
 
Re: Agents no longer accept rich data in catalogs

The issue occurs because the agent makes a node request (which doesn't accept rich data). We cache the node's supported mime types and unfortunately use that list when making the catalog request.

Josh Cooper (Jira)

unread,
Mar 5, 2020, 7:49:02 PM3/5/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Release Notes: Not Needed
Release Notes Summary: Release notes are not needed because the issue never affected released builds.

Josh Cooper (Jira)

unread,
Mar 6, 2020, 1:09:03 AM3/6/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Add the following to a puppetserver's site.pp:

{code:puppet}
notify { "deferred":
   message => Deferred("join", [[1, 2, 3], ":"])
}
{code}

Run an agent from the same host or different host. The {{Accept}} header is missing rich data so the server returns an JSON catalog:

{noformat}
$ git rev-parse HEAD
e9107d98e911f8b956061ab0d5a116c559b8b9a3
$ bundle exec puppet agent -t --http_debug
-> "POST /puppet/v3/catalog/XXX?environment=production HTTP/1.1\r\nX-Puppet-Version: 6.14.0\r\nUser-Agent: Puppet/6.14.0 Ruby/2.5.7-p206 (x86_64-darwin18)\r\nAccept: application/json, application/x-msgpack, text/pson\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nHost: indoor-overtime.delivery.puppetlabs.net:8140\r\nContent-Length: 8002\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n"
...
-> "HTTP/1.1 200 OK\r\n"
-> "Date: Thu, 05 Mar 2020 23:29:16 GMT\r\n"
-> "Content-Type: application/json;charset=utf-8\r\n"
-> "X-Puppet-Version: 6.14.0\r\n"
-> "Vary: Accept-Encoding, User-Agent\r\n"
-> "Content-Encoding: gzip\r\n"
-> "Content-Length: 431\r\n"
-> "\r\n"
{noformat}

As a result the deferred function is never evaluated on the client. In 6.13.0, the agent sends:

{noformat}
<- "POST /puppet/v3/catalog/XXX?environment=production HTTP/1.1\r\nAccept: application/vnd.puppet.rich+json, application/json, application/vnd.puppet.rich+msgpack, application/x-msgpack, text/pson\r\nX-Puppet-Version: 6.13.0\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Puppet/6.13.0 Ruby/2.5.7-p206 (x86_64-darwin18)\r\nHost: indoor-overtime.delivery.puppetlabs.net:8140\r\nContent-Length: 7976\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n"
...
{noformat}

So something is broken in how the agent generates the list of {{Accept}} headers.


Additionally static catalogs are broken and server_list is not used to resolve the file server or report services.

Mihai Buzgau (Jira)

unread,
Mar 6, 2020, 10:03:03 AM3/6/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages