[chef] problem with json serialization in chef-0.9.6, rubygem-json-1.1.9-1.el5


Chronological Thread 
  • From: < >
  • To: < >
  • Subject: [chef] problem with json serialization in chef-0.9.6, rubygem-json-1.1.9-1.el5
  • Date: Tue, 10 Aug 2010 10:36:41 +0200

 
Hi all
 
 
I have a problem when running chef-client on a node because the json serialization crashs where there is a non-ascii character in gecos field in a entry /etc/password
 
e.g.
 
"gecos"=>"Jos\351 San Rom\341n,IT-Arquitectura"
 
The result is this kind of exeception
 
[Tue, 10 Aug 2010 10:11:16 +0200] ERROR: Re-raising exception: JSON::GeneratorError - source sequence is illegal/malformed
/usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/node.rb:403:in `to_json'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/node.rb:403:in `to_json'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/rest.rb:195:in `api_request'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/rest.rb:112:in `post_rest'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/client.rb:321:in `save_node'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/client.rb:94:in `run'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/application/client.rb:215:in `run_application'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/application/client.rb:207:in `loop'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/application/client.rb:207:in `run_application'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/../lib/chef/application.rb:62:in `run'
  /usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/chef-client:26
  /usr/bin/chef-client:19:in `load'
  /usr/bin/chef-client:19
Th json vesrion in used is rubygem-json-1.1.9-1.el5 , Does anyone know which version of json fix that problem ?
-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.
Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------


  • [chef] problem with json serialization in chef-0.9.6, rubygem-json-1.1.9-1.el5, le.huy, 08/10/2010

Archive powered by MHonArc 2.6.16.

§