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/clien
t.rb:215:in `run_application’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/…/lib/chef/application/clien
t.rb:207:in `loop’
/usr/lib/ruby/gems/1.8/gems/chef-0.9.6/bin/…/lib/chef/application/clien
t.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 ?