Issue #22849 has been updated by Josh Partlow.
Installing the msgpack gem seems to result in msgpack becoming the default
format regardless of the preferred_serialization_format setting.
Test was done on a RHEL6 master and agent spun up from our dynamic vsphere
templates with packages installed based off commit bcc8412.
Master:
[root@jy21s2m1kk6wwoz ~]# rpm -q puppet
puppet-3.3.1.555-1.el6.noarch
[root@jy21s2m1kk6wwoz ~]# service puppetmaster status
puppet is stopped
[root@jy21s2m1kk6wwoz ~]# service puppetmaster start
Starting puppetmaster: [ OK ]
[root@jy21s2m1kk6wwoz ~]# puppet master --configprint
preferred_serialization_format
pson
So, :preferred_serialization_format shows as pson.
Agent:
[root@ai2didfrgsz2rpw ~]# curl -i --cert `puppet agent --configprint
hostcert` --key `puppet agent --configprint hostprivkey`
--cacert `puppet agent --configprint localcacert`
https://jy21s2m1kk6wwoz.delivery.puppetlabs.net:8140/foo/node/ai2didfrgsz2rpw.delivery.puppetlabs.net
HTTP/1.1 200 OK
X-Puppet-Version: 3.3.1
Date: Wed, 16 Oct 2013 17:54:35 GMT
Content-Type: text/pson
Connection: Keep-Alive
Content-Length: 3908
Server: WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) OpenSSL/1.0.0
{"data":{"name":"ai2didfrgsz2rpw.delivery.puppetlabs.net", ...
[root@ai2didfrgsz2rpw ~]#
[root@ai2didfrgsz2rpw ~]# curl -i -H 'Accept: */*' --cert `puppet agent
--configprint hostcert` --key
`puppet agent --configprint hostprivkey` --cacert `puppet agent
--configprint localcacert` https://jy2
1s2m1kk6wwoz.delivery.puppetlabs.net:8140/foo/node/ai2didfrgsz2rpw.delivery.puppetlabs.net
HTTP/1.1 200 OK
X-Puppet-Version: 3.3.1
Date: Wed, 16 Oct 2013 17:55:06 GMT
Content-Type: text/pson
Connection: Keep-Alive
Content-Length: 3908
Server: WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) OpenSSL/1.0.0
{"data":{"name":"ai2didfrgsz2rpw.delivery.puppetlabs.net", ...
And we get pson by default. But if we install the msgpack gem and restart the
puppetmaster:
Master:
[root@jy21s2m1kk6wwoz ~]# gem list
*** LOCAL GEMS ***
builder (3.2.0)
json (1.5.5)
nokogiri (1.5.9)
rbvmomi (1.6.0)
trollop (2.0)
[root@jy21s2m1kk6wwoz ~]# gem install msgpack
Building native extensions. This could take a while...
Successfully installed msgpack-0.5.6
1 gem installed
Installing ri documentation for msgpack-0.5.6...
Installing RDoc documentation for msgpack-0.5.6...
[root@jy21s2m1kk6wwoz ~]# service puppetmaster restart
Stopping puppetmaster: [ OK ]
Starting puppetmaster: [ OK ]
[root@jy21s2m1kk6wwoz ~]# puppet master --configprint
preferred_serialization_format
pson
Then the agent starts returning msgpack by default.
Agent:
[root@ai2didfrgsz2rpw ~]# curl -i -H 'Accept: */*' --cert `puppet agent
--configprint hostcert` --key `puppet agent --configprint hostprivkey`
--cacert `puppet agent --configprint localcacert`
https://jy21s2m1kk6wwoz.delivery.puppetlabs.net:8140/foo/node/ai2didfrgsz2rpw.delivery.puppetlabs.net
HTTP/1.1 200 OK
Content-Length: 3529
Date: Wed, 16 Oct 2013 17:57:17 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) OpenSSL/1.0.0
X-Puppet-Version: 3.3.1
Content-Type: application/x-msgpack
Connection: Keep-Alive
ƒ¤name'ai2didfrgsz2rpw.delivery.puppetlabs.net ...
[root@ai2didfrgsz2rpw ~]# curl -i --cert `puppet agent --configprint
hostcert` --key `puppet agent --c
onfigprint hostprivkey` --cacert `puppet agent --configprint localcacert`
https://jy21s2m1kk6wwoz.deli
very.puppetlabs.net:8140/foo/node/ai2didfrgsz2rpw.delivery.puppetlabs.net
HTTP/1.1 200 OK
Content-Length: 3529
Date: Wed, 16 Oct 2013 17:57:37 GMT
Server: WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30) OpenSSL/1.0.0
X-Puppet-Version: 3.3.1
Content-Type: application/x-msgpack
Connection: Keep-Alive
ƒ¤name'ai2didfrgsz2rpw.delivery.puppetlabs.net ...
This may be a failure of preferred_serialization_format being respected rather
than anything this msgpack patch has introduced. I'm still looking into that.
----------------------------------------
Feature #22849: Add msgpack serialization for network communication
https://projects.puppetlabs.com/issues/22849#change-98860
* Author: Andrew Parker
* Status: Merged - Pending Release
* Priority: Normal
* Assignee:
* Category:
* Target version: 3.4.0
* Affected Puppet version:
* Keywords:
* Branch: https://github.com/puppetlabs/puppet/pull/1850
----------------------------------------
YAML is slow and insecure. PSON is a non-compliant form of JSON, which is
implemented with a forked version of json_pure. There is a need for a fast,
standard, network transport serialization format.
[Msgpack](http://msgpack.org/) gives a simple, fast, and well defined library
for serializing all of the data structures that puppet needs to send across the
network.
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.